November 15, 2008
dsimcha wrote:
> == Quote from Tony (tonytech08@gmail.com)'s article
>> Is D today's PASCAL?
>> Tony
> 
> No.  D is not a bondage-and-discipline language.

It's interesting that every successful implementation of Pascal had to add a lot of extensions and escapes to Pascal's overly restrictive semantics. Since every implementation did a different set, Pascal was balkanized into a slew of vendor-specific languages. There was no portability. The portability of C++ buried Pascal.
November 15, 2008
On Sun, 16 Nov 2008 05:22:24 +1300, dsimcha <dsimcha@yahoo.com> wrote:

> == Quote from Tony (tonytech08@gmail.com)'s article
>> Is D today's PASCAL?
>> Tony
>
> No.  D is not a bondage-and-discipline language.


I think you're thinking of Java. Those guys are shit scared of public properties. Get & Set for everything.
November 15, 2008
Tim M wrote:
> I think you're thinking of Java. Those guys are shit scared of public properties. Get & Set for everything.

I never really understood the fear of that, either.
November 15, 2008
On Sat, 15 Nov 2008 10:03:52 -0500, Jarrett Billingsley wrote:

> On Sat, Nov 15, 2008 at 3:01 AM, superdan <super@dan.org> wrote:
>> you'd make ahmadinejad become a feminist & join nato. i'd rate that post at no more than 200 monkey-minutes.
> 
> You have a way with not making any sense.  It's almost like you're a Markov chain.

*grin*

So, did anyone get around to porting the Kant generator [1] to D for slightly more philosophical answers? ;)

-- Daniel

[1] See http://bert.debruijn.be/kgp/ and http://diveintopython.org/ xml_processing/
November 15, 2008
Tim M wrote:
> On Sun, 16 Nov 2008 05:22:24 +1300, dsimcha <dsimcha@yahoo.com> wrote:
> 
>> == Quote from Tony (tonytech08@gmail.com)'s article
>>> Is D today's PASCAL?
>>> Tony
>>
>> No.  D is not a bondage-and-discipline language.
> 
> 
> I think you're thinking of Java. Those guys are shit scared of public properties. Get & Set for everything.

You can't have fields in an interface.

Fields can't be overridden, and you can't add validation to them. (In D, you can use invariants, but they won't tell you what set this field to a bad value.)

The only way to get this behavior in Java is with get/set methods.

This is a case of syntax driving design patterns. In C#, I see people using properties rather than fields everywhere, but I'm starting to think that's bad form. Unless you're using interfaces or doing validation, something interesting like that, just use a public field. In Java, that'd be an expensive change to make; in C# or D, it's cheap.
November 15, 2008
superdan wrote:
> women watching soccer. i'm shocked. where's this world coming to. wut's next... women driving!?!
> 
> funniest part is yer don't even realize how ironic yer response was.
> 

You don't seem to understand the concept of 'progress'. Even if Ahmadinejad were a passionate feminist, he couldn't achieve, say, suffrage for women in a matter of a couple years.
November 15, 2008
Walter Bright wrote:
> Tim M wrote:
>> I think you're thinking of Java. Those guys are shit scared of public properties. Get & Set for everything.
> 
> I never really understood the fear of that, either.

Getters/Setters makes up for lack of 'const'.  Can't change it if there's no setters.  Also, setters are important for all of java's reflection systems, especially the IoC systems such as spring.

Later,
Brad
November 15, 2008
Brad Roberts escribió:
> Walter Bright wrote:
>> Tim M wrote:
>>> I think you're thinking of Java. Those guys are shit scared of public
>>> properties. Get & Set for everything.
>> I never really understood the fear of that, either.
> 
> Getters/Setters makes up for lack of 'const'.  Can't change it if
> there's no setters.  Also, setters are important for all of java's
> reflection systems, especially the IoC systems such as spring.

They also allow you to later change their implementation without the client having to recompile their classes. But doing it everywhere is too much. If I provide an interface to my system and don't allow client code to use "internal" classes that I don't expose, in those classes I allow myself to use public fields.

> 
> Later,
> Brad
November 15, 2008
Walter Bright wrote:
> Tim M wrote:
>> I think you're thinking of Java. Those guys are shit scared of public properties. Get & Set for everything.
> 
> I never really understood the fear of that, either.

One problem is that once you make something public its difficult to make it private or move it to another class without impacting the client who uses the code.  Its difficult if you decide to Pimpl something for example.  D of course allows one to write their own Getter/Setters so that's a non issue.

Of course if your writing something like a simple struct (ie non-invariant) then your not likely to want to encapsulate it any way. It's a pity Java doesn't have a concept of struct.

-Joel
November 16, 2008
Brad Roberts wrote:
> Walter Bright wrote:
>> Tim M wrote:
>>> I think you're thinking of Java. Those guys are shit scared of public
>>> properties. Get & Set for everything.
>> I never really understood the fear of that, either.
> 
> Getters/Setters makes up for lack of 'const'.  Can't change it if
> there's no setters.  Also, setters are important for all of java's
> reflection systems, especially the IoC systems such as spring.

Yes, but I see people use it everywhere because "it's the right way to program."