[clug] Bad features of programming languages.

Steven Hanley sjh at svana.org
Thu Apr 20 01:00:28 UTC 2023


Speaking of dislike,

I have been using Powershell a bit more often the last few years. What I
still can not believe is the behaviour with returning a list from a
function.

I the list has only one object in it it returns the object rather than the
list containing one object.

This is identical for functions you write or built in language functions.

Which makes it ridiculous if you are trying to assume the return from a
function is of type list (empty list or non empty list) as if it has one
member it becomes a object of a different type (not a list)

Not a fan of this decision at all.

Steve


On Thu, Apr 20, 2023 at 09:26:18AM +1000, Bob Edwards via linux wrote:
> On Wed, Apr 19, 2023 at 11:18:52PM +1000, Brenton Ross via linux wrote:
> > Hi,
> > 
> > I am having an interesting conversation about bad features of
> > programming languages. 
> > 
> > I am wondering if anyone from the group has some thoughts on what they
> > hope never to see in a programming language, or just things you really
> > dislike.
> > 
> > Brenton
> > 
> Of course, there is much research in this area - many decades worth.
> 
> I (still) really enjoy writing in C, but, as has been pointed out to me
> a number of times, it is incredibly hard/impossible to properly optimise
> and/or machine validate a C program as the (various) standards leave too
> much open for implementors to make decisions about, and they do, and you
> end up with code that may run fine when compiled with one compiler, but
> present performance and unexpected behaviour problems when compiled on
> another...
> 
> Of course, C came about a long time before people were thinking hard
> about optimisation and machine validation...
> 
> I still like it (a lot).

-- 
Steven Hanley sjh at svana.org http://svana.org/sjh/diary
you were my modulation, so that's what you will always be
we took each other higher, we set each other free
course, neither of us were wearing helmets, and our blood was just everywhere
and when the morphine kicked in later
the censors threw their hands up in despair
   Modulation - Knuckle Down - Ani



More information about the linux mailing list