POV-Ray : Newsgroups : povray.off-topic : Current questions : Re: Current questions Server Time
29 Jul 2024 00:36:28 EDT (-0400)
  Re: Current questions  
From: clipka
Date: 11 May 2013 18:28:07
Message: <518ec5f7@news.povray.org>
Am 11.05.2013 23:21, schrieb Orchid Win7 v1:

>>> Lots of people try to write Haskell like
>>>
>>> data Foobar = Foobar {foo :: Int, bar :: Int, baz :: Int}
>>> data Fizz = Fizz {foo :: Bool, wok :: Int}
>>>
>>> This doesn't work at all, due to a namespace collision.
>>
>> A /severe/ design bug, if I'm asked. Nothing I'd expect from a
>> contemporary programming language.
>
> It's embarrassing, sure. But it's not really an especially severe bug;
> it's just a nuisance having to manually prefix all your field names with
> the name of the type that they belong to (or some abbreviation thereof).

... which is exactly why namespaces were invented in the first place. 
Any contemporary programming language that bothers to use namespaces 
should avoid such nuisances once and for all.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.