C++ launched its community survey, too
TheFlyingFiddle
none at none.com
Wed Feb 28 21:46:49 UTC 2018
On Wednesday, 28 February 2018 at 20:01:34 UTC, H. S. Teoh wrote:
Just to give some background. At work I spend most of my time
maintaining legacy systems adding some small features or
replacing subcomponents. So most of what I do is reading code and
making some minor changes (unless it's buggy code then you get to
rewrite :))
> The idea of sigils is actually not a bad one. It does, after
> all, have basis in natural languages. But the way it was
> implemented in Perl is, shall we say, rather quirky, leading to
> all sorts of unexpected interactions with other things and
> generally become a cognitive burden in large projects, where a
> disproportionate amount of time is spent fighting with syntax
> rather than getting things done. (E.g., is it @$x[$y] or $x->y
> or ${x}{y} or ${x->$y}[$z] or something else?)
Perl is a maintenance nightmare. It just takes so much time to
figure out what the code actually does. Particularity if it has
been changed by multiple people over the years.
That's the main reason Perl is at the top of my most disliked
languages.
> Yeah, that's 10 trains worth of WATs right there. :-D
>
> And the whole thing about == vs === is just one huge WAT. It
> "makes sense" if you understand why it's necessary, but it just
> begs the question, why, oh why, wasn't the language designed
> properly in the first place so that such monstrosities aren't
> necessary?!
Another personal favorite.
function foo($myArray) {
return $myArray['test'];
}
$myString = "hello, world";
$test = foo($myString);
echo $test; // $test = 'h'; Because you know 'test' auto converts
to 0.
Now PHP does have many WATs but it's still simpler to read than
Perl so it has an edge over Perl for me atleast.
>> Compared to them, programming in C++ or Java for that matter
>> is like a dream.
>
> C++ is hardly any better, actually:
>
> https://bartoszmilewski.com/2013/09/19/edward-chands/
Yeah... C++ is interesting in that way. Mostly what I have seen
is that for any given project they have a strict policy of how to
do memory management and error handling. Also it's not really a
pleasure reading C++ templates :D.
> Java... well, Java is a walled garden, a somewhat nice (if
> verbose) one that's somewhat detached from reality, but
> forcefully anchored to it by big commercial interests. As a
> language it's not too bad; the core language is pretty nicely
> designed -- in an idealistic, ivory tower sort of sense.
>
> But in practice, it's more of a Write Once, Debug Everywhere
> deal. The verbosity and IDE dependence sucks. The OO
> fanaticism also sucks (singleton classes IMO is a big code
> smell, esp. when it's really just syntactic lip service to the
> OO religion for what's essentially global functions). The lack
> of real generics is total suck, and a showstopper for me. Even
> the half-hearted attempt at generics that they shoehorned into
> it later doesn't fully save it from being sucky. The only
> saving grace of Java is the extensive library support -- you
> can find just about anything you might imagine as a library,
> which saves you from dealing with the suckier parts of the
> language. Most of the time.
The awful and nice part of Java is that since your forced to do
things a certain way then things will actually be done in that
way. In this case OOP and all of that. It's nice when you read
the code, awful when you actually have to code in it.
>> Only thing missing is the ability to do arbitrary system calls
>> during compilation :D
>
> AKA
> compile-my-source-code-and-get-a-trojan-installed-on-your-system. :-D If this ?
> (mis)feature ever gets merged into DMD, give me a call right
> away -- I have a lot of source code to sell you. For free. :-D
Why must you ruin my perfect plan of getting a free botnet! :D
More information about the Digitalmars-d
mailing list