Using D

Paulo Pinto via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 8 07:48:13 PDT 2014


On Monday, 8 September 2014 at 08:50:54 UTC, Chris wrote:
> On Saturday, 6 September 2014 at 02:24:35 UTC, Mike Parker 
> wrote:
>> On 9/6/2014 12:32 AM, Chris wrote:
>>
>>>
>>> "I don't find it  restrictive at all (I actually enjoy it; I 
>>> also enjoy
>>> C). As long as you work within its boundaries and use it as 
>>> it's meant
>>> to be used, it works perfectly well."
>>>
>>> Isn't this statement a bit contradictory :) It's not 
>>> restrictive as long
>>> as you stay within its boundaries. In D you can stretch the 
>>> boundaries a
>>> bit.
>>
>> Not contradictory, no. Every language has boundaries and you 
>> can stretch them in any language. My point is that when you do 
>> so you are then in the wild frontier and are more likely to be 
>> frustrated in your efforts.
>
> But in D you have to walk quite a bit to reach the boundaries. 
> In Java they're around every corner. It's like a lunatic asylum 
> where you're allowed to do anything you want, except for going 
> out into the real world.
>
> The most frustrating thing is that programmers have to wait for 
> years to get this or that feature. Then there are weird things 
> like auto-boxing etc. that are down to OOP ideology. If people 
> increasingly use static methods to work around OO, well, then 
> why not get rid of the rigid OOP regime altogether? OO is a 
> pattern that helps to deal with certain problems, not a cure 
> for everything. It should never have become a religion, a 
> belief one would base a whole language on. The hello world 
> program shows how absurd this is, and one absurdity begets 
> another one ...
>
> public class MyClass {
>
>     public static void main(String[] args) {
>         System.out.println("Hello, World!");
>     }
>
> }
>
> 1. Write a class
> 2. Use a static method to work around OO.
> 3. Hm. WTF?
>

1. Write a class
2. Use a class method in OO terminology
3. Just like any other pure OOP language (Smalltalk, Eiffel, 
Sather, ...)

This is not Java specific.

Autoboxing is already present in Lisp and Smalltalk with their 
type tagging.

--
Paulo


More information about the Digitalmars-d mailing list