On 8/3/12, martin odersky <
martin....@epfl.ch> wrote:
> On Fri, Aug 3, 2012 at 11:51 PM, Jan Vanek <
j3v...@gmail.com> wrote:
>
>> On 03.08.2012 18:32, Simon Ochsenreither wrote:
>>
>>> Sorry to bring it up again, but I think keeping “module” here is really
>>> unfortunate and will hunt us for years to come.
>>>
>>> Of course it is not great that most people with a Java background equate
>>> “object” with “instance”, but we already live with that problem for a
>>> long
>>> time.
>>>
>>> We shouldn't pile slightly unfortunate naming choices upon slightly
>>> unfortunate naming choices. I think the amount of people who know that
>>> “module” was the ancient name of Scala's “object” can be counted with a
>>> few
>>> hands. It is some interesting trivia, but shouldn't affect an API which
>>> we
>>> expose to users.
>>>
>>>
>> I think reflectObject is the right Scala name. Is there someone with Java
>> background who prefers "module" over "object"? :-)
>>
>
> Object will definitely not work, as it confuses the definition form with
> the instance. The only possibility I can see is "singleton". But, it's a
> huge change that will affect 100s of files and will no doubt cause weeks of
> incompatibilty problems. Not sure it will be worth the trouble.
>
Coming from Java... Some minimal coding... How the ... do I write
static method... What? No statics?... object.. what? wtf?...
hardcoded??... after a while... it's kind of cool... after a while...
how do I write my cool constructors?... what? impossible?... ahh...
companion object... perfect...
Everyone with minimal experience learns very very soon about Scala's
object, and that the name "object" has its Scala specific semantics.
Of course it collides with instance in a way, but everyone is aware of
it already. Having reflectObject is only consequent. Even if we say
the keyword object is confusing, adding reflectObject adds exactly
zero to the confusion.
Not coming from Java... keyword object, method reflectObject... OK
--
Well, my limited view... Put on scale:
reflectObject 10
reflectSingleton 7-8
reflectModule 1
In my immodest opinion, if reflectObject doesn't do, reflectSingleton
is still worth the trouble.
With regards,
Jan
> Cheers
>
> - Martin
>
>
>
>
>>
>> With regards,
>> Jan
>>
>>
>> In my opinion, we should start cleaning up our stuff e. g. going through
>>> our documentation and identifying were we confused “object” with
>>> “instance”, but retreating to yet-another-name is not a great solution.
>>>
>>> Especially “module” ... we will hate us for that naming decision as soon
>>> as a module system (either Java's or our own comes around the corner).
>>> It
>>> will probably force us to make the next “slightly unfortunate” naming
>>> choice in the future.
>>>
>>> If we choose “module” know, what will be the name of the module system
>>> in
>>> X years?
>>>
>>> Let's avoid technical debt where it is clearly anticipatable.
>>>
>>> Thanks and bye,
>>>
>>> Simon
>>>
>>
>>
>
>
> --
> Martin Odersky
> Prof., EPFL <
http://www.epfl.ch> and Chairman,
> Typesafe<
http://www.typesafe.com>