Package name `reflect.makro`

78 views
Skip to first unread message

Johannes Rudolph

unread,
Apr 21, 2012, 1:53:13 PM4/21/12
to scala...@googlegroups.com
Those imports:

import language.experimental.macros
import reflect.makro._

seem a bit inconsequential given that `macro` is written one time with
`c` and one time with `k`. Wouldn't it make sense to use the same name
always? I guess, it's `makro` because `macro` is now a keyword. So
wouldn't it be nice if it would be `reflect.macros` as well? On a
related (heretic) note couldn't you just put the
language.experimental.macros implicit directly into the
`reflect.makro` package object? I mean why would anyone `import
reflect.makro` if not for implementing a macro? [1] Or are we
maintaining the fine line between someone who is manipulating
expressions (using `reflect.makro` classes) just for fun and someone
who is actually defining a macro?

--
Johannes

[1] On the other hand why would anyone _not_ want to write a macro
using the `macro` keyword.

-----------------------------------------------
Johannes Rudolph
http://virtual-void.net

Eugene Burmako

unread,
Apr 21, 2012, 2:09:35 PM4/21/12
to scala...@googlegroups.com
Yeah, in London I've got a lot of boos about "k" in makro. Once everyone's back in Lausanne, we'll discuss naming options once again.

Speaking of import language.experimental.macros, it's perfectly possible to define macro implementations separately from definitions, so the two imports you've mentioned are orthogonal. So to speak, when you import language.experimental.macros, you import the "macro" keyword, and when you import reflect.makro._, you import Context.

Daniel Sobral

unread,
Apr 21, 2012, 2:38:52 PM4/21/12
to scala...@googlegroups.com
Count me in the "go with macros" camp. I see absolutely no reason to
impose 31337 5p34k on us when a simple "s" avoids the whole keyword
problem.

And, yes, I abhor "clazz" as well.

--
Daniel C. Sobral

I travel to the future all the time.

√iktor Ҡlang

unread,
Apr 21, 2012, 2:42:54 PM4/21/12
to scala...@googlegroups.com
No one is for "makkros"? :-)
--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: @viktorklang

Daniel Sobral

unread,
Apr 21, 2012, 2:57:49 PM4/21/12
to scala...@googlegroups.com
Do I get a giant robot for myself if I support "macross"?

2012/4/21 √iktor Ҡlang <viktor...@gmail.com>:

Som Snytt

unread,
Apr 21, 2012, 4:20:06 PM4/21/12
to scala...@googlegroups.com
On Sat, Apr 21, 2012 at 11:09 AM, Eugene Burmako <eugene....@epfl.ch> wrote:
Yeah, in London I've got a lot of boos about "k" in makro. Once everyone's back in Lausanne, we'll discuss naming options once again.

I think one of the non-technical charms of Scala is its central European provenance.

In that vein, I've often wished the language were called Skala.  That also jibes with the "sk" in Odersky.

I can imagine someone hitting a problem in Java, and a colleague suggests, "Oder Skala?"

Although I appreciate the English pun in "scalable,"  I would add that Scala is rich in metaphors of a Skala, a musical "scale" with overtones.

I haven't thought this through, but I think there is at least a loose metaphor between overtones and types (which may also be higher-kinded.)

Also, the English idiom, "to run the gamut", derives from gamut as the "gamma ut", which is described here:
http://en.wikipedia.org/wiki/Guidonian_hand

In other words, Scala not only "runs the gamut" of programming idioms, but embodies it, makes it natural to the hand when you're typing in code.  (The notion of typography as such is described e.g. at
http://books.google.com/books/about/Typography.html?id=PiYl-AbiFHsC .)

OK, I concede to "macros", but only after adding that, with enumerations, I always question the ess.  Is an enumeration of Foo(s) a Foo or a Foos?  Contrary to practice, I call it Foos.  For example, at random, from some test code:

sealed trait Sizeable {
  def size: Int
}

object Sizes extends Enumeration {
  type Size = MySize

  val Small = MySize(4)
  val Medium = MySize(8)
  val Large = MySize(12)

  class MySize private[Sizes] (sz: Int) extends Val with Sizeable {
    def size = sz
  }

  private def MySize(sz: Int) = new MySize(sz)
}

Yes I appreciate "scala.collection" vs collections.

Please excuse eccentricities in this email, as it is the week-end.

Paul Phillips

unread,
Apr 22, 2012, 6:31:06 AM4/22/12
to scala...@googlegroups.com
On Sat, Apr 21, 2012 at 1:20 PM, Som Snytt <som....@gmail.com> wrote:
> In that vein, I've often wished the language were called Skala.

As ridiculous as it must sound, I bet it would have a fraction of the uptake.

Speaking on behalf of americans: we're weird and provincial, bordering
on xenophobic, and if something sounds too "foreign" we will find any
number of reasons to avoid it. "Scala" is exotic without being
threatening. "Skala" is foreign.

Incidentally, if anyone's wondering about my personal naming
aesthetic, no way was I going to let "makro" survive if I could help
it.

Heiko Seeberger

unread,
Apr 22, 2012, 8:40:54 AM4/22/12
to scala...@googlegroups.com
On Apr 22, 2012, at 12:31 PM, Paul Phillips wrote:

> Incidentally, if anyone's wondering about my personal naming
> aesthetic, no way was I going to let "makro" survive if I could help
> it.

Well spoken.

Heiko

Reply all
Reply to author
Forward
0 new messages