Null references redux

Jeremie Pelletier jeremiep at gmail.com
Sun Sep 27 10:59:15 PDT 2009


language_fan wrote:
> Sun, 27 Sep 2009 12:35:23 -0400, Jeremie Pelletier thusly wrote:
> 
>> language_fan wrote:
>>> Sun, 27 Sep 2009 00:08:50 -0400, Jeremie Pelletier thusly wrote:
>>>
>>>> Ary Borenszweig wrote:
>>>>> Just out of curiosity: have you ever programmed in Java or C#?
>>>> Nope, never got interested in these to tell the truth. I only did C,
>>>> C++, D and x86 assembly in systems programming, I have quite a
>>>> background in PHP and JavaScript also.
>>> So you only know imperative procedural programming + some features of
>>> hybrid OOP languages that are not even proper OOP languages.
>> This is what I know best, yeah. I did a lot of work in functional
>> programming too, but not enough to add them to the above list.
>>
>> What is proper OOP anyways? It's a feature offered by the language, not
>> a critical design that must obey to some strict standard rules.  Be it
>> class based or prototype based, supporting single or multiple
>> inheritance, using abstract base classes or interfaces, having funny
>> syntax for ctors and whatnot or using the class name or even 'this', its
>> still OOP. If you wan't to call me on not knowing 15 languages like you
>> do, I have to call you on not knowing the differences in OOP models.
> 
> I must say I have not studied languages that much, only the concepts and 
> theory - starting from formal definitions like operational or 
> denotational semantics, and some more informal ones. I can professionally 
> write code in only about half a dozen languages, but learning new ones is 
> trivial if the task requires it.
> 
> Generally the common thing for proper pure OOP languages is 'everything 
> is an object' mentality. Because of this property there is no strict 
> distinction between primitive non-OOP types and OOP types in pure OOP 
> languages. In some languages e.g. number values are objects. In others 
> there are no static members and even classes are objects, so called meta-
> objects. In some way you can see this purity even in UML. If we go into 
> details, various OOP languages have major differences in their semantics.
> 
> What I meant above is that I know a lot of developers who have a similar 
> background as you do. It is really easy to use all of those languages 
> without actually using the OOP features in them, at least properly (for 
> instance PHP does not even have a real OOP system, it is a cheap rip-off 
> of mainstream languages - just look at the scoping rules). I have seen 
> Java code where the developer never constructs new objects and only uses 
> static methods because he fears the heap allocation is expensive. 
> Discussing OOP and language concepts is really hard if you lack the 
> theoretical underpinning. It is sad to say this but the best source for 
> this knowledge are academic CS books, but nowadays even wikipedia is 
> starting to have good articles on the subject.

I agree, Wikipedia is often the first source I check to learn on 
different concepts, then I search for online papers and documentation, 
dig into source code (Google's code search is a gem), and finally books.

I'm not most programmers, and I'm sure you aren't either. I like to 
learn as much of the semantics and implementation details behind a 
language as I can, only then do I feel I know the language, I like to 
make the best out of everything in the languages I use, not specialize 
in a subset of it.

I don't believe in a perfect programming model, I believe in many 
different models each having their pros and cons that can live in the 
same language forming an all-around solution. That's why I usually stay 
away from 'pure' languages because they impose a single point of view of 
the world, that doesn't mean its a bad one, I just like to look at the 
world from different angles at the same time.



More information about the Digitalmars-d mailing list