View mode: basic / threaded / horizontal-split · Log in · Help
July 24, 2012
Re: Just where has this language gone wrong?
On Sun, 22 Jul 2012 20:24:19 +0200
Paulo Pinto <pjmlp@progtools.org> wrote:

> Am 22.07.2012 00:16, schrieb Nick Sabalausky:
> > On Sat, 21 Jul 2012 23:14:12 +0200
> > "Stuart"<stugol@gmx.com>  wrote:
> >> Let me just add, I really *like* the terse syntax of D. Lambdas,
> >> uniform function call syntax, and so on.
> >>
> >
> > Yea. I used Java in college and ever since then I've been a fan of
> > non-verbose systax - ie syntax that's the *opposite* of Java ;)
> >
> 
> Actually that verbose sintax

"verbose sintax"...Was that deliberate spelling or a very coincidental
accident?

> is quite helpful when dealing with
> gigantic code bases in big corporation projects like where I work.
> 
> The type of "programmer clogs" we have in our projects are so low
> skill, that I have bad dreams what they could do in more powerfull
> languages.
> 
> Already C# is highly advanced for some of them!
>

Actually, that may be a good reason NOT to use a training-wheels
language like Java - one they finally do *that* much damage, maybe
they'll finally get the boot ;) Mwa ha ha ha ha!

> What I hate in Java is the abuse of annotations to avoid introducing
> new keyworks, like @overload.
> 

Heh, sounds vaguely similar to another language I've heard of...Hmm,
what was it called...? Not C...Something after that... ;)

I never actually stuck around in Java long enough to see the annotation
stuff (though I've heard about it). I think 1.3 or 1.4 was about when I
fled.
July 24, 2012
Re: Just where has this language gone wrong?
On 7/23/12 5:14 PM, Simen Kjaeraas wrote:
> On Mon, 23 Jul 2012 22:51:19 +0200, Stuart <stugol@gmx.com> wrote:
>
>> Saves us having to create a struct for every goddamn little function;
>> or using tuples directly, which means we have to refer to variables
>> like .value1 and .value2 instead of something meaningful.
>
> You mean like this?
>
> Tuple!(float, "x", float, "y") bar() {
> return typeof(return)( 0.0, 0.0 );
> }
>
> auto xCoord = bar().x;
>
>
> I dislike the typeof(return) in there, as assignment between tuples with
> and without named fields works perfectly. Bring me the sky, Walter?

We could make

return tuple(0.0, 0.0);

to work. I can't imagine a scenario in which this relaxation would cause 
a bug.


Andrei
July 24, 2012
Re: Just where has this language gone wrong?
On Mon, Jul 23, 2012 at 10:00:24PM -0400, Nick Sabalausky wrote:
> On Sun, 22 Jul 2012 20:24:19 +0200
> Paulo Pinto <pjmlp@progtools.org> wrote:
[...]
> > The type of "programmer clogs" we have in our projects are so low
> > skill, that I have bad dreams what they could do in more powerfull
> > languages.
> > 
> > Already C# is highly advanced for some of them!
> >
> 
> Actually, that may be a good reason NOT to use a training-wheels
> language like Java - one they finally do *that* much damage, maybe
> they'll finally get the boot ;) Mwa ha ha ha ha!
[...]

Unfortunately, that usually happens only after they burned down your
project. It only takes one twig to burn down a forest; it only takes one
twit to burn down a project.

Reminds of a certain individual who shall remain unnamed, with whom I
argued about why he should *not* implement IPv6 prefix checking by
converting the address and prefixes to strings and then using
strncmp()... Truly boggles the mind.


T

-- 
I'm still trying to find a pun for "punishment"...
July 24, 2012
Re: Just where has this language gone wrong?
On Tuesday, 24 July 2012 at 02:51:44 UTC, H. S. Teoh wrote:
>
> Reminds of a certain individual who shall remain unnamed, with 
> whom I
> argued about why he should *not* implement IPv6 prefix checking 
> by
> converting the address and prefixes to strings and then using
> strncmp()... Truly boggles the mind.
>

I'm reminded of a close friend of mine... once he was asked to 
review some code, after the sole author had spent a few weeks on 
it.  I was lucky (?) enough to be in the room to hear him 
actually say: "That's... cute.  Not *wise* but cute.  Do you 
remember what functions are?"  I don't recall there being a 
response.

-- Chris NS
July 24, 2012
Re: Just where has this language gone wrong?
>"Stuart"  wrote in message news:nnyvtncaxpgnjtklvyhd@forum.dlang.org...
>On Monday, 23 July 2012 at 15:56:37 UTC, Paulo Pinto wrote:
>> Am 23.07.2012 14:49, schrieb Stuart:
>>> On Saturday, 21 July 2012 at 22:16:52 UTC, Nick Sabalausky wrote:
>>>>
>>>> C++ is living in the 70's.
>>>
>>> Precisely what I have been thinking. It's a loose wrapper around
>>> assembly, nothing more. Certainly not the "high-level language"
>>> it's touted as.
>>
>> Only due to the lack of modules.
>>
>> Everything else is a pretty modern language I would say.
>
>Hardly. No RTTI. No GC. No properties. No events. No closures. No extension 
>methods. No interfaces. No writable references.
>
>I can live without a GC; and interfaces can be simulated using pure virtual 
>base classes; but all the others are standard in pretty much any modern 
>language and impossible to reproduce in C++.


RTTI is available last time I checked. Sure it is not a full reflection 
runtime,
but from my daily job experience with Enterprise Architecture with 
reflection everywhere
in JVM and .NET languages, not sure if C++ really needs a full reflection 
API.

GC is optional since C++11, sure it a nice to have, but reference pointers 
alleviate a bit the issue.

Extension methods are nice, but if you look at our Enterprise Architectures, 
they can surely be
abused to death, monkey patch hurray!

Interfaces are only required as such in languages that don't support MI.

If you need a writable references use pointers.

--
Paulo
July 24, 2012
Re: Just where has this language gone wrong?
>"Nick Sabalausky"  wrote in message news:20120723171909.00000527@unknown...
>
>On Mon, 23 Jul 2012 22:51:19 +0200
>"Stuart" <stugol@gmx.com> wrote:
>
>> On Monday, 23 July 2012 at 15:56:37 UTC, Paulo Pinto wrote:
>> > Am 23.07.2012 14:49, schrieb Stuart:
>> >> On Saturday, 21 July 2012 at 22:16:52 UTC, Nick Sabalausky
>> >> wrote:
>> >>>
>> >>> C++ is living in the 70's.
>> >>
>> >> Precisely what I have been thinking. It's a loose wrapper
>> >> around
>> >> assembly, nothing more. Certainly not the "high-level language"
>> >> it's touted as.
>> >
>> > Only due to the lack of modules.
>> >
>> > Everything else is a pretty modern language I would say.
>>
>> Hardly. No RTTI. No GC. No properties. No events. No closures. No
>> extension methods. No interfaces. No writable references.
>>
>
>Null-terminated strings. Preprocessor. No reflection. Effectively
>undefined sizes for primitive types. Undefined behavior galore. Neither
>default initialization nor enforced initialization before variable
>usage. No reference types (Foo& isn't what I mean). Horrendous type
>syntax for mixed arrays/ptrs or functions ptrs, etc. No forward
>references (or at least very limited). And a grammar that forces
>compilation to be very, very slow.

Null-terminated strings are a consequence of C compatibility, which is very 
70's.
Nowadays I mostly use std::string or QtString, no null-terminated strings 
for me, unless talking
with C apis.

Preprocessor is quite handy as long as you don't abuse it.

Undefined sizes for primitive types is the only way to have a language that 
doesn't impose restrictions
on the target processor. D on the other hand is not able to target anything 
lower than 32 bits, if I understand
correctly.

Compilation slowness is true,  that was my complaint regarding modules. It 
all boils down to
the 70's compiler/linker model inherited from C, instead of the module 
system introduced by languages
like Modula-2 already in 1983.


>
>And a lot more still that's lacking if you don't count C++11 which
>isn't widely supported yet (ex: foreach, basic type inference).
>
>And the fact that static analysis tools are as super useful as they are
>is plenty proof alone that the language itself is WAAAY behind the
>curve.

This is valid for C as well.

My main point is that despite C++ issues it still feels very modern to me, 
specially
when you compare with what Go, a modern language from 2009 offers. I'll take 
C++
over Go any day.

But in the end I really miss that Turbo Pascal/Delphi lost the mainstream 
language game.

Luckly there are quite a few languages where their spirit lives on, C# and D 
being two of them.

--
Paulo
July 24, 2012
Re: Just where has this language gone wrong?
On Tue, 24 Jul 2012 08:40:13 +0200
"Chris NS" <ibisbasenji@gmail.com> wrote:

> On Tuesday, 24 July 2012 at 02:51:44 UTC, H. S. Teoh wrote:
> >
> > Reminds of a certain individual who shall remain unnamed, with 
> > whom I
> > argued about why he should *not* implement IPv6 prefix checking 
> > by
> > converting the address and prefixes to strings and then using
> > strncmp()... Truly boggles the mind.
> >
> 
> I'm reminded of a close friend of mine... once he was asked to 
> review some code, after the sole author had spent a few weeks on 
> it.  I was lucky (?) enough to be in the room to hear him 
> actually say: "That's... cute.  Not *wise* but cute.  Do you 
> remember what functions are?"  I don't recall there being a 
> response.
> 

That's...hilarious. Disturbing, but hilarious.
July 24, 2012
Re: Just where has this language gone wrong?
David Nadlinger wrote:
> On Sunday, 22 July 2012 at 03:06:28 UTC, Jens Mueller wrote:
> >Where is argmin defined? I couldn't find it.
> 
> On the slide before that… ;)

:)

Jens
July 24, 2012
Re: Just where has this language gone wrong?
On Tue, 24 Jul 2012 04:21:18 +0200, Andrei Alexandrescu  
<SeeWebsiteForEmail@erdani.org> wrote:

>> Tuple!(float, "x", float, "y") bar() {
>> return typeof(return)( 0.0, 0.0 );
>> }
[snip]
> We could make
>
> return tuple(0.0, 0.0);
>
> to work. I can't imagine a scenario in which this relaxation would cause  
> a bug.

I would argue it should work, for the exact reasons outline above. And as
you say, it should cause no bugs.

But can it be made to work in current D, as a library solution? Or do you
mean the language should be changed? (This looks to me a lot like the old
opImplicitCast)

-- 
Simen
July 24, 2012
Re: Just where has this language gone wrong?
On Tuesday, July 24, 2012 11:03:16 Simen Kjaeraas wrote:
> On Tue, 24 Jul 2012 04:21:18 +0200, Andrei Alexandrescu
> 
> <SeeWebsiteForEmail@erdani.org> wrote:
> >> Tuple!(float, "x", float, "y") bar() {
> >> return typeof(return)( 0.0, 0.0 );
> >> }
> 
> [snip]
> 
> > We could make
> > 
> > return tuple(0.0, 0.0);
> > 
> > to work. I can't imagine a scenario in which this relaxation would cause
> > a bug.
> 
> I would argue it should work, for the exact reasons outline above. And as
> you say, it should cause no bugs.
> 
> But can it be made to work in current D, as a library solution? Or do you
> mean the language should be changed? (This looks to me a lot like the old
> opImplicitCast)

That's what alias this is for.

- Jonathan M Davis
4 5 6 7 8 9 10
Top | Discussion index | About this forum | D home