JS vs Js, to capitalize the S or not

44 views
Skip to first unread message

Benjamin Jackman

unread,
Sep 5, 2014, 11:10:19 AM9/5/14
to scal...@googlegroups.com
Ok,

so prepare for some bike-shedding (Sorry) but this has really been itiching at me for a while,

If you were writing a method that converts an object to a javascript representation,

would you use

a. toJs
b. toJS
c. I am clever and i would write it as 'toJavascript' hahaha

What are we thinking with the S in JS/Js do we capitalize it or not?

Maybe it's just me but I like (a) which is more inline with how I write the rest of my Scala code
and fits with my general policy on camelCasing acronyms. (treat the acronym like any other
word and only capitalize the first letter which makes converting to snake/train case more consistent)

I know, I know, don't be silly everyone can do their own thing 
or it's already ScalaJS so in ScalaJS we use a capital S get out of here with your lowercase s nonsense. etc...






Haoyi Li

unread,
Sep 5, 2014, 12:58:32 PM9/5/14
to Benjamin Jackman, scal...@googlegroups.com
My vote's for Js, since it's a short form for Javascript, not JavaScript. I'm using Js in upickle, and people generally call it Json (e.g. in jackson, gson, etc.) in identifiers not JSON.

(unless you're the browser with JSON.stringify, but if you're the browser you're insane anyway)


--
You received this message because you are subscribed to the Google Groups "Scala.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-js+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-js/3177c691-ed30-43b7-8642-d45ade24b0d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vasya Novikov

unread,
Sep 5, 2014, 1:48:01 PM9/5/14
to scal...@googlegroups.com
I strongly vote for "Js", too. The JS is counter-intuitive, at least for me.

( I also made a lot of typos already, writing Js as it commonly is. )
>> <https://groups.google.com/d/msgid/scala-js/3177c691-ed30-43b7-8642-d45ade24b0d0%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

--
Vasya Novikov

Sébastien Doeraene

unread,
Sep 5, 2014, 1:52:14 PM9/5/14
to Vasya Novikov, scal...@googlegroups.com
Hi,

I use JS, and it is consistently written like that in the Scala.js codebase. JS stands for JavaScript with an uppercase S. I never saw Javascript written with a lowercase s.
But hey, it's your codebase, you can do what you want ;-)

Cheers,
Sébastien




--
Vasya Novikov

--
You received this message because you are subscribed to the Google Groups "Scala.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-js+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-js/5409F74E.4060307%40yandex.ru.

Vasya Novikov

unread,
Sep 5, 2014, 2:20:57 PM9/5/14
to Sébastien Doeraene, scal...@googlegroups.com
Heh, the typos I wrote about were exactly related to scala.js ... :)

BTW, googling or duckduckgo-ing is harder with "scala.js" than with
"scalajs". Dunno about the rest of you guys, but I use "scalajs" for
searching anyway. Why is it exactly that scala-js has a delimiter in its
name? Even "angularjs" tries to avoid this, as far as I see.
>>>> email to scala-js+u...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/scala-js/3177c691-ed30-
>>>> 43b7-8642-d45ade24b0d0%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/scala-js/3177c691-ed30-
>>>> 43b7-8642-d45ade24b0d0%40googlegroups.com?utm_medium=
>>>> email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>>
>>>
>> --
>> Vasya Novikov
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Scala.js" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to scala-js+u...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/scala-js/5409F74E.4060307%40yandex.ru.
Reply all
Reply to author
Forward
0 new messages