This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Scripting profiles for Scala.

63 replies
Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.

I am looking for a scripting environment for designers who less
familiar with programming.
I really like Scala, but many people I have personally ask find Scala
features overwhelming. How difficult would it be to restrict Scala to
a subset of normal functionality. Say, removing "operator
overloading", parametrization, types, and pretty much leaving a
javaScript like features.
Maybe there is a framework out there that offers "limited profiles"
with a restricted subset of Scala features.

Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Scripting profiles for Scala.

On Saturday April 2 2011, Lex wrote:
> I am looking for a scripting environment for designers who less
> familiar with programming.
> I really like Scala, but many people I have personally ask find Scala
> features overwhelming. How difficult would it be to restrict Scala to
> a subset of normal functionality. Say, removing "operator
> overloading", parametrization, types, and pretty much leaving a
> javaScript like features.
> Maybe there is a framework out there that offers "limited profiles"
> with a restricted subset of Scala features.

You can't take things away from the language. If you're not comfortable
with a feature of the language, simply refrain from using it.

Randall Schulz

Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

I am perfectly comfortable. However I keep finding sentiments similar
to this blogpost (not mine):
http://alarmingdevelopment.org/?p=562#more-562
Why not simply make a ScalaScript plugin that restricts the use of
some features and be done with it?

> You can't take things away from the language. If you're not comfortable
> with a feature of the language, simply refrain from using it.
>
>
> Randall Schulz
>

vpatryshev
Joined: 2009-02-16,
User offline. Last seen 1 year 24 weeks ago.
Re: Scripting profiles for Scala.

I wonder where such ideas can come from. Why do you need scala, use plain c.

Thanks,
-Vlad

On Sat, Apr 2, 2011 at 11:42 AM, Lex wrote:
> I am looking for a scripting environment for designers who less
> familiar with programming.
> I really like Scala, but many people I have personally ask find Scala
> features overwhelming. How difficult would it be to restrict Scala to
> a subset of normal functionality. Say, removing "operator
> overloading", parametrization, types, and pretty much leaving a
> javaScript like features.
> Maybe there is a framework out there that offers "limited profiles"
> with a restricted subset of Scala features.
>

jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
On Sat, Apr 2, 2011 at 11:58 AM, Lex <lexn82 [at] gmail [dot] com> wrote:
I am perfectly comfortable. However I keep finding sentiments similar
to this blogpost (not mine):
http://alarmingdevelopment.org/?p=562#more-562
Why not simply make a ScalaScript plugin that restricts the use of
some features and be done with it?

Since you're one raising the issue, that's a question for *you*  -- why do you just write a plugin and be done with it? Perhaps because it takes time and effort. Perhaps because all the documentation and third party books  would be broken, and probably the core libraries too. Perhaps it's because it's a bad idea for numerous reasons.

-- Jim
Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

The scripting profile will not break anything. It would be possible to
use all the libraries written in full Scala. The restriction would be
on the features used in the code compiled with a limited profile.
For examples, the implicits are limited. This means the compiler would
still us the implicits in scope but would not let you make new
implcits. This does not have to break anything at all.

Limited profiles are perfect for creating DSLs that are designed for
very specific purposes. The target audience would only have to learn a
small subset of Scala + the DSL itself. Also it would prevent them
from writing highly complicated Scala code that is outside intended
use of DSL.

Lets say you want a scripting language for a game. Scala will never be
accepted for that purpose in the present form. One look at the list of
features by the game designers and they will be gone. On the other
hand, if you have a library that exposes the game logic and a restrict
the Scala to only use variables and functions, it will be exactly the
tool for the job.

Scala has many features and it's great. However many of them are very
complicated and are mostly needed for library design. Not everyone
wants to design libraries. Often a simple and to the point language is
preferable. If a child needs a calculator for his third grade, you do
not give him a laptop. What is needed is the right tool for the job,
with the right amount of features.

Now, aside from personal insults, crude suggestions to use something
else, and a blind faith, I am yet to see any reasonable arguments
against limited Scala profiles.

On Sun, Apr 3, 2011 at 5:15 AM, Jim Balter wrote:
> On Sat, Apr 2, 2011 at 11:58 AM, Lex wrote:
>
> Since you're one raising the issue, that's a question for *you*  -- why do
> you just write a plugin and be done with it? Perhaps because it takes time
> and effort. Perhaps because all the documentation and third party books
> would be broken, and probably the core libraries too. Perhaps it's because
> it's a bad idea for numerous reasons.
>

Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Scripting profiles for Scala.

On Sunday April 3 2011, Lex wrote:
> ...
>
> Now, aside from personal insults, crude suggestions to use something
> else, and a blind faith, I am yet to see any reasonable arguments
> against limited Scala profiles.

No insults were given.

But the point remains. You want to program in some other language.
There's no argument against that. It's what you want. Go for it.

But it's _not Scala_ and hence off-topic here.

> ...

Randall Schulz

Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

I dont want to program in another language. I love Scala. I want to
give the users of my DSL an option to use a subset of Scala. My DSL is
still written in Scala, so it's perfectly relevant and on topic.

On the other hand every single response you gave was to derail this
discussion, now that is off topic. You keep trying to find reasons to
dismiss the argument, yet you have ignored any of my questions to
provide rational arguments to back your point. If you have something
of substance to add, please share it, otherwise please keep it to
yourself.

On Sun, Apr 3, 2011 at 1:48 PM, Randall R Schulz wrote:
>
> No insults were given.
>
> But the point remains. You want to program in some other language.
> There's no argument against that. It's what you want. Go for it.
>
> But it's _not Scala_ and hence off-topic here.
>
>
>> ...
>
>
> Randall Schulz
>

Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
Re: Scripting profiles for Scala.
If you want to use a subset of Scala, I would just do it.   At work I use C++, but our style guide limits us to a small subset of C++ that is considered 'safe'.   That is, except for certain areas of our code base where folks deviate from these rules to make something useful.
The argument of keeping things simple and avoiding advanced features really only goes so far.  The problem you're trying to solve is people who don't quite understand and advanced feature of a  language from abusing that feature.   This same issue could happen on any feature, we just tend to pick on ones we don't understand well ourselves, because it seems scarier.
So, I think your question elicited a more negative response because there have been a lot of less civil conversations started by anti-scala folks on this topic.

On Sun, Apr 3, 2011 at 1:59 PM, Lex <lexn82 [at] gmail [dot] com> wrote:
I dont want to program in another language. I love Scala. I want to
give the users of my DSL an option to use a subset of Scala. My DSL is
still written in Scala, so it's perfectly relevant and on topic.

On the other hand every single response you gave was to derail this
discussion, now that is off topic. You keep trying to find reasons to
dismiss the argument, yet you have ignored any of my questions to
provide rational arguments to back your point. If you have something
of substance to add, please share it, otherwise please keep it to
yourself.


On Sun, Apr 3, 2011 at 1:48 PM, Randall R Schulz <rschulz [at] sonic [dot] net> wrote:
>
> No insults were given.
>
> But the point remains. You want to program in some other language.
> There's no argument against that. It's what you want. Go for it.
>
> But it's _not Scala_ and hence off-topic here.
>
>
>> ...
>
>
> Randall Schulz
>

Peter C. Chapin 2
Joined: 2011-01-07,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

On Sun, 3 Apr 2011, Vlad Patryshev wrote:

> I wonder where such ideas can come from. Why do you need scala, use plain c.

I have an interest in language subsetting. It's a perfectly valid thing to
think about. My interest is in the area of high integrity programming where
removing certain difficult to analyze features can create a (sub)language
that is more tractable for static analysis tools. The trick, of course, is
removing features that will produce the desired effect without doing
violence to the host language or negating the host language's advantages.

I understand the original poster is interested in creating a sublanguage of
Scala that simplifies the "learning load" of the language. I can see that
having a tool-enforced subset of Scala might be of interest to certain
classes of users (no pun intended). However, I'm not clear about what such a
subset might look like.

Peter

Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Scripting profiles for Scala.

On Sunday April 3 2011, Lex wrote:
> On Sun, Apr 3, 2011 at 1:48 PM, Randall R Schulz wrote:
> > No insults were given.
> >
> > But the point remains. You want to program in some other language.
> > There's no argument against that. It's what you want. Go for it.
> >
> > But it's _not Scala_ and hence off-topic here.
> >
> >> ...
>
> I dont want to program in another language. I love Scala. I want to
> give the users of my DSL an option to use a subset of Scala. My DSL
> is still written in Scala, so it's perfectly relevant and on topic.
>
> On the other hand every single response you gave was to derail this
> discussion, now that is off topic. You keep trying to find reasons to
> dismiss the argument, yet you have ignored any of my questions to
> provide rational arguments to back your point. If you have something
> of substance to add, please share it, otherwise please keep it to
> yourself.

If you want to program in Scala, you're home.

But so far, there is no argument to be given. It is up to you to give a
detailed specification of the subset language you want. Then we can
give arguments about the consequences of that subset language.

Otherwise it's angels dancing on the head of a pin.

Randall Schulz

Peter C. Chapin 2
Joined: 2011-01-07,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

On Sun, 3 Apr 2011, Lex wrote:

> Scala has many features and it's great. However many of them are very
> complicated and are mostly needed for library design. Not everyone wants
> to design libraries. Often a simple and to the point language is
> preferable. If a child needs a calculator for his third grade, you do not
> give him a laptop. What is needed is the right tool for the job, with the
> right amount of features.

Can you get the effect you want *just* using a DSL? For example Kojo [1] is
an environment targeting children but that uses Scala. In effect the kids
program in Scala, although they are using a DSL to do it. I don't believe
the environment hides any part of Scala from the users, though. Disclaimer:
That's my understanding of the system... I haven't actually played with it.

Peter

[1] http://www.kogics.net/sf:kojo

Russ P.
Joined: 2009-01-31,
User offline. Last seen 1 year 26 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 11:10 AM, Randall R Schulz <rschulz [at] sonic [dot] net> wrote:
On Sunday April 3 2011, Lex wrote:
> On Sun, Apr 3, 2011 at 1:48 PM, Randall R Schulz wrote:
> > No insults were given.
> >
> > But the point remains. You want to program in some other language.
> > There's no argument against that. It's what you want. Go for it.
> >
> > But it's _not Scala_ and hence off-topic here.
> >
> >> ...
>
> I dont want to program in another language. I love Scala. I want to
> give the users of my DSL an option to use a subset of Scala. My DSL
> is still written in Scala, so it's perfectly relevant and on topic.
>
> On the other hand every single response you gave was to derail this
> discussion, now that is off topic. You keep trying to find reasons to
> dismiss the argument, yet you have ignored any of my questions to
> provide rational arguments to back your point. If you have something
> of substance to add, please share it, otherwise please keep it to
> yourself.

If you want to program in Scala, you're home.

But so far, there is no argument to be given. It is up to you to give a
detailed specification of the subset language you want. Then we can
give arguments about the consequences of that subset language.


I think you're going too far here, Randall. Lex is just trying to get some preliminary feedback on an idea that seems fairly reasonable to me. He does not need a "detailed specification" at this point. Whether his idea is worth pursuing or not, I don't know, but I can see the potential value.

Yes, you can always tell someone to just use the subset of the language that they wish to use, but that is not quite the same as enforcing it at the compiler level. If you are developing a DSL, you don't necessarily have control over the coding standards of everyone who uses it.

I could even see this as facilitating the use of Scala for teaching. The compiler could have a level switch that enforces a particular subset, depending on the level of the course. That would give the students immediate feedback if they are stepping out of bounds, and it would simplify things for the instructor too. I'm not saying this is necessarily worth doing, but I don't think it is so ridiculous that it should be immediately dismissed.

--Russ P.

 
Otherwise it's angels dancing on the head of a pin.


Randall Schulz



--
http://RussP.us
Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

> So, I think your question elicited a more negative response because there
> have been a lot of less civil conversations started by anti-scala folks on
> this topic.

One of the reasons I want limited profiles is to take away the
arguments of all the Scala-nay-sayers. Here is how it works:

Scala-nay-sayer: Scala is too complicated, all these features are way
over what i need!
Scala-user: Just use limited Scala profiles, a Subset of Scala
enforced by the tools. You can still use all the existing Java and
Scala libraries.
Scala-nay-sayer: :O

> But so far, there is no argument to be given. It is up to you to give a
> detailed specification of the subset language you want. Then we can
> give arguments about the consequences of that subset language.

One way to offer subsets of Scala is to created custom Profiles.
Picture a big list of checkboxes that enable/disable features. A
particular configuration of this would be called a Profile.

However it may be better to have a well-known and predefined number of
profiles. I think the following profiles would be most useful:

Basic Profile:
Enabled:
* defining vals and vars
* using conditional states and loops
* defining functions.
* using existing classes and invoke existing functions, even when
functions require curring, closures, or higher order functions.
* using stuff that requires implicits
Disabled:
* defining classes and objects
* defining parametrization on functions.
* defining type declarations
* defining curried functions or higher order functions.
* defining implicits
* using match statement

Scripting Profile, building on top of the Basic Profile, by enabling
more features:
Enabled on top of Basic Profile:
* defining curried functions
* defining higher-order functions
* defining classes and objects
* using match statement
Still disabled:
* defining parametrization on classes and functions
* defining type declarations
* defining implicits

Full Scala Profile: everything is enabled ;)

Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
Re: Scripting profiles for Scala.
I understand what you're saying, I just don't really think this will make the nay-sayers happy, since underneath all that 'dangerous stuff' still exists.  I think these folks would be much happier with a different langauge, one in which they steal many concepts from Scala.  However, feel free to prove me wrong!

On Sun, Apr 3, 2011 at 2:46 PM, Lex <lexn82 [at] gmail [dot] com> wrote:
> So, I think your question elicited a more negative response because there
> have been a lot of less civil conversations started by anti-scala folks on
> this topic.

One of the reasons I want limited profiles is to take away the
arguments of all the Scala-nay-sayers. Here is how it works:

Scala-nay-sayer: Scala is too complicated, all these features are way
over what i need!
Scala-user: Just use limited Scala profiles, a Subset of Scala
enforced by the tools. You can still use all the existing Java and
Scala libraries.
Scala-nay-sayer: :O

> But so far, there is no argument to be given. It is up to you to give a
> detailed specification of the subset language you want. Then we can
> give arguments about the consequences of that subset language.

One way to offer subsets of Scala is to created custom Profiles.
Picture a big list of checkboxes that enable/disable features. A
particular configuration of this would be called a Profile.

However it may be better to have a well-known and predefined number of
profiles. I think the following profiles would be most useful:

Basic Profile:
 Enabled:
   * defining vals and vars
   * using conditional states and loops
   * defining functions.
   * using existing classes and invoke existing functions, even when
functions require curring, closures, or higher order functions.
   * using stuff that requires implicits
 Disabled:
  * defining classes and objects
  * defining parametrization on functions.
  * defining type declarations
  * defining curried functions or higher order functions.
  * defining implicits
  * using match statement

Scripting Profile, building on top of the Basic Profile, by enabling
more features:
 Enabled on top of Basic Profile:
   * defining curried functions
   * defining higher-order functions
   * defining classes and objects
   * using match statement
 Still disabled:
   * defining parametrization on classes and functions
   * defining type declarations
   * defining implicits

Full Scala Profile: everything is enabled ;)

Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Scripting profiles for Scala.

On Sunday April 3 2011, Lex wrote:
> > So, I think your question elicited a more negative response because
> > there have been a lot of less civil conversations started by
> > anti-scala folks on this topic.
>
> One of the reasons I want limited profiles is to take away the
> arguments of all the Scala-nay-sayers. Here is how it works:
>
> Scala-nay-sayer: Scala is too complicated, all these features are way
> over what i need!

See? It's bogus before it starts. "Too complicated" is a vacuous
statement unless you're going to say exactly what complexity it
possesses and compare and contrast that with the complexity it allows
you to forego in the code you write.

I'm of the opinion that all these vacuous arguments against Scala are
nothing more than expressions of unfamiliarity and an unwillingness to
be placed in the position of a beginner where once the person was an
expert.

And carving up the language to protect newcomers from having to learn
things only forestalls the use of those language features to produce
better code. It's lose-lose.

> ...

Randall Schulz

Russ P.
Joined: 2009-01-31,
User offline. Last seen 1 year 26 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 11:57 AM, Randall R Schulz <rschulz [at] sonic [dot] net> wrote:
On Sunday April 3 2011, Lex wrote:
> > So, I think your question elicited a more negative response because
> > there have been a lot of less civil conversations started by
> > anti-scala folks on this topic.
>
> One of the reasons I want limited profiles is to take away the
> arguments of all the Scala-nay-sayers. Here is how it works:
>
> Scala-nay-sayer: Scala is too complicated, all these features are way
> over what i need!

See? It's bogus before it starts. "Too complicated" is a vacuous
statement unless you're going to say exactly what complexity it
possesses and compare and contrast that with the complexity it allows
you to forego in the code you write.

I'm of the opinion that all these vacuous arguments against Scala are
nothing more than expressions of unfamiliarity and an unwillingness to
be placed in the position of a beginner where once the person was an
expert.


And carving up the language to protect newcomers from having to learn
things only forestalls the use of those language features to produce
better code. It's lose-lose.



That's not quite right in general. Take programming education, for example. A classic error made by programming novices is to use advanced language features where simpler, basic features are adequate for the job. A language subset could conceivably be used to prevent that error.

Here's another example. Suppose you want to create a DSL for controlling a robot or a manufacturing process. This might be something beyond what an operator would use directly but could be used by a technician or engineer to set parameters, modes, or basic safety logic. Maybe it would be something that would only be changed under very strict conditions. You want it to be as simple as possible for safety reasons, yet still capable of doing what it needs to do. You don't want someone diddling with more advanced features than are needed, particulary if safety is an issue. A subset of the language could well be appropriate in that case.

--Russ P.

--
http://RussP.us
Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

> I understand what you're saying, I just don't really think this will make
> the nay-sayers happy, since underneath all that 'dangerous stuff' still
> exists.  I think these folks would be much happier with a different
> langauge, one in which they steal many concepts from Scala.  However, feel
> free to prove me wrong!

It is not possible to convince everyone to use Scala or it's subset.
However it will be possible to capture many people who are would never
try Scala in the present form. Once they succeed, others will be
tempted more, providing a stream of new users to the language.

Right now the Scala community consists mostly of well-seasoned
programmers. And there are relatively few novice programmers. That
could all be changed.

> I'm of the opinion that all these vacuous arguments against Scala are
> nothing more than expressions of unfamiliarity and an unwillingness to
> be placed in the position of a beginner where once the person was an
> expert.

This is the perception of Scala by many people. We cannot argue if the
perception is true or false, because it will do nothing to change it.

I think what we are dealing here is a pure programmer's laziness. A
programmer sees a long list of features and has to say to him/herself:
am I really gonna learn of all of that?
Everyone who is into Scala has answered "YES" to that questions, many
of you have answered "HELL YES!". However not everyone has the same
level of programming abilities and free time to cover it all.

Personally, I find it difficult to use a language with features I do
not understand. What happens is I will either learn all the features
or abandon the whole thing. And I am not alone. There is a reason
people describe Scala as having an _overwhelming_ amount of features.
What's worse, it is a very consistent reason for abandoning the
language.

Exposing a limited set of functionality and enforcing it at the tool
level will make people feel "safe" that they only have to learn so
much. This would bring more novice users. Some people will stay on
that level, other's will advance to learn more, and eventually master
all of Scala.

Cay Horstmann
Joined: 2009-09-04,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

> Exposing a limited set of functionality and enforcing it at the tool
> level will make people feel "safe" that they only have to learn so
> much. This would bring more novice users. Some people will stay on
> that level, other's will advance to learn more, and eventually master
> all of Scala.
>

This would be particularly useful for promoting Scala in education.
(The idea is not a new one--Racket has done this for years, and with
pretty good success.) The primary benefit is that beginners cannot
accidentally use a feature of which they are not aware. They'd get a
(hopefully intelligible) error message instead of code that is
technically correct but doesn't reflect their intention.

Right now, Python is viewed by quite a few people as an ideal language
for teaching programming. It is a scripting language with instant
feedback, it is simple enough that one can wrap its head around the
whole thing pretty quickly, and it has lots of libraries for graphics,
scientific programming, etc.

An "entry level" Scala subset would be a great alternative, and it
would draw more people into the Scala ecosystem. I think it could be
quite compelling. One would have access to the wealth of Java
libraries, which are often better than their Python counterparts, and
there is the upward migration path to full Scala.

Cheers,

Cay

jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
I see a lot of unsupported assertions. In the future, please troll scala-debate, not scala-user.

-- Jim


On Sun, Apr 3, 2011 at 10:14 AM, Lex <lexn82 [at] gmail [dot] com> wrote:
The scripting profile will not break anything. It would be possible to
use all the libraries written in full Scala. The restriction would be
on the features used in the code compiled with a limited profile.
For examples, the implicits are limited. This means the compiler would
still us the implicits in scope but would not let you make new
implcits. This does not have to break anything at all.

Limited profiles are perfect for creating DSLs that are designed for
very specific purposes. The target audience would only have to learn a
small subset of Scala + the DSL itself. Also it would prevent them
from writing highly complicated Scala code that is outside intended
use of DSL.

Lets say you want a scripting language for a game. Scala will never be
accepted for that purpose in the present form. One look at the list of
features by the game designers and they will be gone. On the other
hand, if you have a library that exposes the game logic and a restrict
the Scala to only use variables and functions, it will be exactly the
tool for the job.

Scala has many features and it's great. However many of them are very
complicated and are mostly needed for library design. Not everyone
wants to design libraries. Often a simple and to the point language is
preferable. If a child needs a calculator for his third grade, you do
not give him a laptop. What is needed is the right tool for the job,
with the right amount of features.

Now, aside from personal insults, crude suggestions to use something
else, and a blind faith, I am yet to see any reasonable arguments
against limited Scala profiles.


On Sun, Apr 3, 2011 at 5:15 AM, Jim Balter <Jim [at] balter [dot] name> wrote:
> On Sat, Apr 2, 2011 at 11:58 AM, Lex <lexn82 [at] gmail [dot] com> wrote:
>
> Since you're one raising the issue, that's a question for *you*  -- why do
> you just write a plugin and be done with it? Perhaps because it takes time
> and effort. Perhaps because all the documentation and third party books
> would be broken, and probably the core libraries too. Perhaps it's because
> it's a bad idea for numerous reasons.
>
> -- Jim
>

Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

I was simply expressing my opinion on the subject. There are
absolutely no assertions. If you disagree with something please point
it out and explain why you disagree. Maybe then we can have a
discussion.

Instead you are making an absolutely unsupported allegation of
trolling. Just because YOU disagree with something does not make it
trolling.
I have asked this before and I am asking again. Please, either add
something of substance to the discussion or keep it to yourself.

On Sun, Apr 3, 2011 at 9:44 PM, Jim Balter wrote:
> I see a lot of unsupported assertions. In the future, please troll
> scala-debate, not scala-user.
>

jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 11:27 AM, Russ Paielli <russ [dot] paielli [at] gmail [dot] com> wrote:
On Sun, Apr 3, 2011 at 11:10 AM, Randall R Schulz <rschulz [at] sonic [dot] net> wrote:
On Sunday April 3 2011, Lex wrote:
> On Sun, Apr 3, 2011 at 1:48 PM, Randall R Schulz wrote:
> > No insults were given.
> >
> > But the point remains. You want to program in some other language.
> > There's no argument against that. It's what you want. Go for it.
> >
> > But it's _not Scala_ and hence off-topic here.
> >
> >> ...
>
> I dont want to program in another language. I love Scala. I want to
> give the users of my DSL an option to use a subset of Scala. My DSL
> is still written in Scala, so it's perfectly relevant and on topic.
>
> On the other hand every single response you gave was to derail this
> discussion, now that is off topic. You keep trying to find reasons to
> dismiss the argument, yet you have ignored any of my questions to
> provide rational arguments to back your point. If you have something
> of substance to add, please share it, otherwise please keep it to
> yourself.

If you want to program in Scala, you're home.

But so far, there is no argument to be given. It is up to you to give a
detailed specification of the subset language you want. Then we can
give arguments about the consequences of that subset language.


I think you're going too far here, Randall. Lex is just trying to get some preliminary feedback on an idea that seems fairly reasonable to me.

No, he's not doing that -- he is not asking for feedback, he is wedded to a position and denigrates any view to the contrary, dismissing them as "blind faith" and not "reasonable"; even the mere mention of other programming languages is deemed "crude". He's not here to have an actual dialog, and it's ironically fitting that he's come up against  Randall, who is quite his unyielding opinionated counterpart.
 
He does not need a "detailed specification" at this point.

He does when he says that someone -- but apparently not himself  -- should "simply make a ScalaScript plugin that restricts the use of some features and be done with it".

(The term "ScalaScript" is quite amusing, given the JavaScript model of a language that had nothing to do with Java but used its name for marketing purposes. Yeah, that sure simplified things for the newbies.)

 
Whether his idea is worth pursuing or not, I don't know, but I can see the potential value.

Good luck with that in this thread. I know how it will turn out so I'll quit now.

-- Jim
jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
"There are absolutely no assertions."

How droll, troll.

-- Jim


On Sun, Apr 3, 2011 at 6:57 PM, Lex <lexn82 [at] gmail [dot] com> wrote:
I was simply expressing my opinion on the subject. There are
absolutely no assertions. If you disagree with something please point
it out and explain why you disagree. Maybe then we can have a
discussion.

Instead you are making an absolutely unsupported allegation of
trolling. Just because YOU disagree with something does not make it
trolling.
I have asked this before and I am asking again. Please, either add
something of substance to the discussion or keep it to yourself.


On Sun, Apr 3, 2011 at 9:44 PM, Jim Balter <Jim [at] balter [dot] name> wrote:
> I see a lot of unsupported assertions. In the future, please troll
> scala-debate, not scala-user.
>
> -- Jim

Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

> No, he's not doing that -- he is not asking for feedback, he is wedded to a
> position and denigrates any view to the contrary, dismissing them as "blind
> faith" and not "reasonable"; even the mere mention of other programming
> languages is deemed "crude". He's not here to have an actual dialog, and
> it's ironically fitting that he's come up against  Randall, who is quite his
> unyielding opinionated counterpart.

There have been lots of back and forth, with people neutral or pro
adding some feedback why it may be good or bad. However there was no
substantial arguments from people who hate the idea. All I get are
insulting suggestions to use something else, suggestions that it's
off-topic, and now it came down to troll-calling. That is some very
strong hate. Without any kind of arguments or pretenses of a dialog. I
call that "blind faith".

Please prove me wrong and give some reason WHY you think having Scala
profiles is a bad idea. I understand that some of you hate it. The
question is WHY. All I am looking for is for you to elaborate your
position. For my part I have done plenty of elaboration without going
out of the way to insult anyone.

> He does when he says that someone -- but apparently not himself  -- should
> "simply make a ScalaScript plugin that restricts the use of some features
> and be done with it".

If you bothered to actually read the thread, I have given a fairly
detailed specification.

> Good luck with that in this thread. I know how it will turn out so I'll quit
> now.

Here is a tip. When you say you are going to quit something: DO IT.

Russ P.
Joined: 2009-01-31,
User offline. Last seen 1 year 26 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 7:13 PM, Jim Balter <Jim [at] balter [dot] name> wrote:

He does not need a "detailed specification" at this point.

He does when he says that someone -- but apparently not himself  -- should "simply make a ScalaScript plugin that restricts the use of some features and be done with it".


Unless I am mistaken, you are attributing to Lex what Randall wrote.

I do not understand why you think Lex is "trolling" here. He may (or may not) be misguided in his objective, but that is not quite the same as being a "troll." In fact, I am a bit suspicious of people who throw that term around loosely -- as I am of leftists who routinely mislabel their political adversaries as "racist" to avoid honest debate and discussion.

--Russ P.

--
http://RussP.us
Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Scripting profiles for Scala.

On Sunday April 3 2011, Lex wrote:
> ...
>
> ... All I get are insulting suggestions to use something else, ...

I still see no insults in what's been written.

> Please prove me wrong and give some reason WHY you think having Scala
> profiles is a bad idea. ...

You appear to think that by using the word "profile" you're talking
about something other than creating a new language. But that is what
you're actually suggesting.

Present your idea as what it is: A request for a new language.

> ...

Randall Schulz

Lex
Joined: 2010-02-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

You just keep dismissing the discussion as off-topic. Let's recall
what you said:

1.
> These lists are for the Scala language. You're asking for a different
> language, one that's carved out of Scala. What relevance does it have
> here?

2.
> But the point remains. You want to program in some other language.
> There's no argument against that. It's what you want. Go for it.
>
> But it's _not Scala_ and hence off-topic here.

3.
> You appear to think that by using the word "profile" you're talking
> about something other than creating a new language. But that is what
> you're actually suggesting.
>
> Present your idea as what it is: A request for a new language.

I do not see you tracking down every Java-Scala interoperability
thread, saying it's off topic, and asking people to have the
discussion somewhere else. Which is what you are doing here.
The main feature of Scala profiles would be using libraries written in
Scala. This alone makes this discussion as relevant as any Java
discussion. So although I still disagree it's a new language I don't
think it even matters.

On Sun, Apr 3, 2011 at 11:10 PM, Randall R Schulz wrote:
>> ...
>>
>> ... All I get are insulting suggestions to use something else, ...
>
> I still see no insults in what's been written.
>

I did not find what you said insulting, but there were many comments
from others that were over the top. That bit was not addressed to you,
sorry for misunderstanding.

Russ P.
Joined: 2009-01-31,
User offline. Last seen 1 year 26 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 8:10 PM, Randall R Schulz <rschulz [at] sonic [dot] net> wrote:

You appear to think that by using the word "profile" you're talking
about something other than creating a new language. But that is what
you're actually suggesting.

Present your idea as what it is: A request for a new language.



You could just as well claim that every change requested for Scala would make it a "new" language. Well, technically that may be true, but so what? It might mean that this thread should be on scala-debate, but that's about the extent of it.

If the desired "new" language is a subset of Scala, then every program written in that language will compile with a Scala compiler, hence every program written in that language is a Scala program. So it's not really a "new" language but rather part of an "old" language.

I am curious about why you are so vehemently opposed the idea of a simpler subset of Scala, because I am having a hard time thinking of a valid reason to oppose it in principle. I am not claiming we need a subset language badly, but I can see the potential use for it. Are you perhaps afraid that you will someday be forced to use the restricted subset of the language? If not, then what is you concern?

--Russ P.

--
http://RussP.us
jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.

On Sun, Apr 3, 2011 at 8:02 PM, Russ Paielli <russ [dot] paielli [at] gmail [dot] com> wrote:
On Sun, Apr 3, 2011 at 7:13 PM, Jim Balter <Jim [at] balter [dot] name> wrote:

He does not need a "detailed specification" at this point.

He does when he says that someone -- but apparently not himself  -- should "simply make a ScalaScript plugin that restricts the use of some features and be done with it".


Unless I am mistaken, you are attributing to Lex what Randall wrote.


You are indeed quite mistaken. How about actually reading the posts instead of just basing your understanding on your random imaginings?


I do not understand why you think Lex is "trolling" here. He may (or may not) be misguided in his objective, but that is not quite the same as being a "troll." In fact, I am a bit suspicious of people who throw that term around loosely -- as I am of leftists who routinely mislabel their political adversaries as "racist" to avoid honest debate and discussion.
 How extremely informative about you.

-- Jim
jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 8:01 PM, Lex <lexn82 [at] gmail [dot] com> wrote:
> No, he's not doing that -- he is not asking for feedback, he is wedded to a
> position and denigrates any view to the contrary, dismissing them as "blind
> faith" and not "reasonable"; even the mere mention of other programming
> languages is deemed "crude". He's not here to have an actual dialog, and
> it's ironically fitting that he's come up against  Randall, who is quite his
> unyielding opinionated counterpart.

There have been lots of back and forth, with people neutral or pro
adding some feedback why it may be good or bad. However there was no
substantial arguments from people who hate the idea. All I get are
insulting suggestions to use something else, suggestions that it's
off-topic, and now it came down to troll-calling. That is some very
strong hate. Without any kind of arguments or pretenses of a dialog. I
call that "blind faith".

Please prove me wrong and give some reason WHY you think having Scala
profiles is a bad idea. I understand that some of you hate it. The
question is WHY. All I am looking for is for you to elaborate your
position. For my part I have done plenty of elaboration without going
out of the way to insult anyone.

> He does when he says that someone -- but apparently not himself  -- should
> "simply make a ScalaScript plugin that restricts the use of some features
> and be done with it".

If you bothered to actually read the thread, I have given a fairly
detailed specification.

> Good luck with that in this thread. I know how it will turn out so I'll quit
> now.

Here is a tip. When you say you are going to quit something: DO IT.

Here's a tip: stop being such an ass.
jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 8:01 PM, Lex <lexn82 [at] gmail [dot] com> wrote:
> He does when he says that someone -- but apparently not himself  -- should
> "simply make a ScalaScript plugin that restricts the use of some features
> and be done with it".

If you bothered to actually read the thread, I have given a fairly
detailed specification.

You should tell *Russ* that -- *he* is the one who attributed to Randall what I quoted from you above, and wrote that you are "just trying to get some preliminary feedback on an idea" and that you """[do] not need a "detailed specification" at this point""". If *you* would bother to read the very post you replied to, you would see that I never said that you didn't give a fairly detailed specification, I only responded to Russ's assertion. (I don't actually consider the details you have provided to be a "specification", but that's just a quibble.)

So how's this going for you? Any progress on getting that subset plugin done?

-- Jim

Russ P.
Joined: 2009-01-31,
User offline. Last seen 1 year 26 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 9:09 PM, Jim Balter <Jim [at] balter [dot] name> wrote:

On Sun, Apr 3, 2011 at 8:02 PM, Russ Paielli <russ [dot] paielli [at] gmail [dot] com> wrote:
On Sun, Apr 3, 2011 at 7:13 PM, Jim Balter <Jim [at] balter [dot] name> wrote:

He does not need a "detailed specification" at this point.

He does when he says that someone -- but apparently not himself  -- should "simply make a ScalaScript plugin that restricts the use of some features and be done with it".


Unless I am mistaken, you are attributing to Lex what Randall wrote.


You are indeed quite mistaken. How about actually reading the posts instead of just basing your understanding on your random imaginings?


Fine, I stand corrected on that point.
 


I do not understand why you think Lex is "trolling" here. He may (or may not) be misguided in his objective, but that is not quite the same as being a "troll." In fact, I am a bit suspicious of people who throw that term around loosely -- as I am of leftists who routinely mislabel their political adversaries as "racist" to avoid honest debate and discussion.
 How extremely informative about you.


And just how is that "extremely informative" about me, Jim? That I don't appreciate people using bogus labels to quash debate and discussion? A "troll" is someone who writes disengenous and deliberately inflammatory posts just to annoy people and to get them to waste their time responding. You may not agree with what Lex proposed, but I'm fairly certain he was not doing that -- and I'll bet you are too. I think you just pulled the "troll" label out of your rear end because you could not come up with a rational response.

I'm still trying to figure out what it is about Lex's suggestion that bothers you and Randall so much. I can understand it if you just think a Scala language subset is just not worth the trouble to implement, but you guys act as if it is some sort of major insult to the language. It is not. Read Cay Horstmann's post earlier in this thread.

And the way you asked Lex how he is doing on the compiler plugin is interesting. Are you implying that he is not capable of writing it? I have no idea if he is capable or not, and I doubt you do either. But even if he does not have the necessary skills, are you implying that he cannot suggest the idea? So a programming language exists only to satisy the writers of its compiler? I sure hope not.

--Russ P.

--
http://RussP.us
Russ P.
Joined: 2009-01-31,
User offline. Last seen 1 year 26 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 5:48 PM, Cay Horstmann <cay [dot] horstmann [at] gmail [dot] com> wrote:
> Exposing a limited set of functionality and enforcing it at the tool
> level will make people feel "safe" that they only have to learn so
> much. This would bring more novice users. Some people will stay on
> that level, other's will advance to learn more, and eventually master
> all of Scala.
>

This would be particularly useful for promoting Scala in education.
(The idea is not a new one--Racket has done this for years, and with
pretty good success.) The primary benefit is that beginners cannot
accidentally use a feature of which they are not aware. They'd get a
(hopefully intelligible) error message instead of code that is
technically correct but doesn't reflect their intention.

Right now, Python is viewed by quite a few people as an ideal language
for teaching programming. It is a scripting language with instant
feedback, it is simple enough that one can wrap its head around the
whole thing pretty quickly, and it has lots of libraries for graphics,
scientific programming, etc.

An "entry level" Scala subset would be a great alternative, and it
would draw more people into the Scala ecosystem. I think it could be
quite compelling. One would have access to the wealth of Java
libraries, which are often better than their Python counterparts, and
there is the upward migration path to full Scala.

Cheers,

Cay

Hi Cay,

I found your post interesting, and it would be a shame it if got lost in the noise here on this thread. Also, people should know that you are not just ranting idly. You are a computer science education professional, and I see that you've written at least 8 books on programming. If a subset of Scala were widely chosen as a pedagogical language, that would be a major coup for Scala itself.

--Russ P.

--
http://RussP.us
jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 11:17 PM, Russ Paielli <russ [dot] paielli [at] gmail [dot] com> wrote:
On Sun, Apr 3, 2011 at 5:48 PM, Cay Horstmann <cay [dot] horstmann [at] gmail [dot] com> wrote:
> Exposing a limited set of functionality and enforcing it at the tool
> level will make people feel "safe" that they only have to learn so
> much. This would bring more novice users. Some people will stay on
> that level, other's will advance to learn more, and eventually master
> all of Scala.
>

This would be particularly useful for promoting Scala in education.
(The idea is not a new one--Racket has done this for years, and with
pretty good success.) The primary benefit is that beginners cannot
accidentally use a feature of which they are not aware. They'd get a
(hopefully intelligible) error message instead of code that is
technically correct but doesn't reflect their intention.

Right now, Python is viewed by quite a few people as an ideal language
for teaching programming. It is a scripting language with instant
feedback, it is simple enough that one can wrap its head around the
whole thing pretty quickly, and it has lots of libraries for graphics,
scientific programming, etc.

An "entry level" Scala subset would be a great alternative, and it
would draw more people into the Scala ecosystem. I think it could be
quite compelling. One would have access to the wealth of Java
libraries, which are often better than their Python counterparts, and
there is the upward migration path to full Scala.

Cheers,

Cay

Hi Cay,

I found your post interesting, and it would be a shame it if got lost in the noise here on this thread. Also, people should know that you are not just ranting idly. You are a computer science education professional, and I see that you've written at least 8 books on programming. If a subset of Scala were widely chosen as a pedagogical language, that would be a major coup for Scala itself.

The goal of Racket, virtually from its inception almost 20 years ago, was to be  a pedagogical tool.  That would be a repurposing of Scala, and certainly would take more effort than "simply make a ScalaScript plugin that restricts the use of some features and be done with it". (I'm not Randall; the idea of creating such a subset Scala does not offend me. What does offend me are statements like that quote and the assertion that anyone who thinks there might be more to it is exhibiting "blind faith" and is "a hater".)

-- Jim
jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
On Sun, Apr 3, 2011 at 5:48 PM, Cay Horstmann <cay [dot] horstmann [at] gmail [dot] com> wrote:
> Exposing a limited set of functionality and enforcing it at the tool
> level will make people feel "safe" that they only have to learn so
> much. This would bring more novice users. Some people will stay on
> that level, other's will advance to learn more, and eventually master
> all of Scala.
>

This would be particularly useful for promoting Scala in education.
(The idea is not a new one--Racket has done this for years, and with
pretty good success.) The primary benefit is that beginners cannot
accidentally use a feature of which they are not aware. They'd get a
(hopefully intelligible) error message instead of code that is
technically correct but doesn't reflect their intention.

Right now, Python is viewed by quite a few people as an ideal language
for teaching programming. It is a scripting language with instant
feedback, it is simple enough that one can wrap its head around the
whole thing pretty quickly, and it has lots of libraries for graphics,
scientific programming, etc.

The funny thing is that Python is a large language with a raft of special cases and quirks and irregularities and special __...__ symbols, while being considerably weaker than Scala. At the same time, no one is calling for defining subsets to make features inaccessible in order to make it an ideal language for teaching programming, so perhaps such subsetting isn't really needed and isn't really the problem with the perception of Scala. And if that is what is needed, how would you go about teaching people how to use Scala's libraries, which depend on such features as implicits and generics? How would you make sure that those "hopefully intelligible" error messages only speak in the subset language? We have a lot of experience on this list with people asking how they got such-and-such a message or what it means, where the answer necessarily goes into quite a bit of detail about the type system. Consider the recent thread on Scaladoc's [usecase] that results in erroneous documentation. Of course that needs to be fixed, but it's just the beginning.  Remember that both Racket and Python have been designed to be easy to learn from the very beginning -- that's not a feature that you can just tack onto a language as a plugin that limits what features people use.

Tony Morris 2
Joined: 2009-03-20,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

On 04/04/11 10:48, Cay Horstmann wrote:
> Right now, Python is viewed by quite a few people as an ideal language
> for teaching programming.
Not wanting to throw fuel on the fire, but no serious teacher of
programming I know believes this (python is an ideal language for
teaching programming) to be true. The "teaching" of python is widely
regarded (according to my selection) as destructive to the educational
endeavour. I am very sympathetic to this view. Indeed, I can confidently
make certain guarantees about the result of teaching programming with
python.

Russ P.
Joined: 2009-01-31,
User offline. Last seen 1 year 26 weeks ago.
Re: Scripting profiles for Scala.
On Mon, Apr 4, 2011 at 1:17 AM, Tony Morris <tonymorris [at] gmail [dot] com> wrote:
On 04/04/11 10:48, Cay Horstmann wrote:
> Right now, Python is viewed by quite a few people as an ideal language
> for teaching programming.
Not wanting to throw fuel on the fire, but no serious teacher of
programming I know believes this (python is an ideal language for
teaching programming) to be true. The "teaching" of python is widely
regarded (according to my selection) as destructive to the educational
endeavour. I am very sympathetic to this view. Indeed, I can confidently
make certain guarantees about the result of teaching programming with
python.



I'd be interested in those "guarantees" if you care to briefly outline them.

If you google it, you will find that Python is regarded by many as a good language for teaching programming. See, for example,

http://www.stanford.edu/~pgbovine/python-teaching.htm

My intuition tells me that Python is probably a decent pedagogical language for elementary and high school but is probably not a great choice at the college level (except perhaps for non-CS students). Then again, my intuition could be completely wrong.

I recognize the limits of Python, but I also recognize that it *is* possible to write quality non-trivial code in Python that works correctly and gets the job done. I don't think it rots your brain -- at least not as bad as C++ does. (Then again, if it rotted my brain, I probably wouldn't realize it anyway, would I.)

--Russ P.

--
http://RussP.us
jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
On Mon, Apr 4, 2011 at 2:15 AM, Russ Paielli <russ [dot] paielli [at] gmail [dot] com> wrote:
On Mon, Apr 4, 2011 at 1:17 AM, Tony Morris <tonymorris [at] gmail [dot] com> wrote:
On 04/04/11 10:48, Cay Horstmann wrote:
> Right now, Python is viewed by quite a few people as an ideal language
> for teaching programming.
Not wanting to throw fuel on the fire, but no serious teacher of
programming I know believes this (python is an ideal language for
teaching programming) to be true. The "teaching" of python is widely
regarded (according to my selection) as destructive to the educational
endeavour. I am very sympathetic to this view. Indeed, I can confidently
make certain guarantees about the result of teaching programming with
python.



I'd be interested in those "guarantees" if you care to briefly outline them.

If you google it, you will find that Python is regarded by many as a good language for teaching programming. See, for example,

http://www.stanford.edu/~pgbovine/python-teaching.htm



Ha ha, great example: "Run-time type errors rather than compile-time type errors"

Aside from that lunacy, most of his other reasons apply to Scala just as much, and often more so. You could point out the things that make Scala not a good language for teaching programming, but that would be special pleading -- no such negatives are mentioned for Python in this or similar one-sided accounts from Python fans. The very act of googling for such accounts incurs a damning level of bias.
 
My intuition tells me that Python is probably a decent pedagogical language for elementary and high school but is probably not a great choice at the college level (except perhaps for non-CS students). Then again, my intuition could be completely wrong.

I recognize the limits of Python, but I also recognize that it *is* possible to write quality non-trivial code in Python that works correctly and gets the job done. I don't think it rots your brain -- at least not as bad as C++ does. (Then again, if it rotted my brain, I probably wouldn't realize it anyway, would I.)


Mighty faint praise.

-- Jim

Russ P.
Joined: 2009-01-31,
User offline. Last seen 1 year 26 weeks ago.
Re: Scripting profiles for Scala.
On Mon, Apr 4, 2011 at 2:35 AM, Jim Balter <Jim [at] balter [dot] name> wrote:

If you google it, you will find that Python is regarded by many as a good language for teaching programming. See, for example,

http://www.stanford.edu/~pgbovine/python-teaching.htm




Ha ha, great example: "Run-time type errors rather than compile-time type errors"


I'm not quite sure why he said that, but I'm sure he's not claiming that run-time errors are preferable in general. I think he's just saying they are less confusing for beginner students. That's a pedagogical issue, not a CS issue.

 

Aside from that lunacy, most of his other reasons apply to Scala just as much, and often more so. You could point out the things that make Scala not a good language for teaching programming, but that would be special pleading -- no such negatives are mentioned for Python in this or similar one-sided accounts from Python fans. The very act of googling for such accounts incurs a damning level of bias.
 
My intuition tells me that Python is probably a decent pedagogical language for elementary and high school but is probably not a great choice at the college level (except perhaps for non-CS students). Then again, my intuition could be completely wrong.

I recognize the limits of Python, but I also recognize that it *is* possible to write quality non-trivial code in Python that works correctly and gets the job done. I don't think it rots your brain -- at least not as bad as C++ does. (Then again, if it rotted my brain, I probably wouldn't realize it anyway, would I.)


Mighty faint praise.


Indeed. I have no particular reason to praise Python -- but I have no reason to dump on it excessively either. It is not my choice anymore now that I have discovered Scala, but you cannot deny that some fairly impressive things have been done with Python.

--Russ P.

--
http://RussP.us
jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Scripting profiles for Scala.
On Mon, Apr 4, 2011 at 2:51 AM, Russ Paielli <russ [dot] paielli [at] gmail [dot] com> wrote:
On Mon, Apr 4, 2011 at 2:35 AM, Jim Balter <Jim [at] balter [dot] name> wrote:

If you google it, you will find that Python is regarded by many as a good language for teaching programming. See, for example,

http://www.stanford.edu/~pgbovine/python-teaching.htm




Ha ha, great example: "Run-time type errors rather than compile-time type errors"


I'm not quite sure why he said that

Well, maybe you should read the articles you link to, as he was quite clear about it.
 
, but I'm sure he's not claiming that run-time errors are preferable in general. I think he's just saying they are less confusing for beginner students. That's a pedagogical issue, not a CS issue.

 

Aside from that lunacy, most of his other reasons apply to Scala just as much, and often more so. You could point out the things that make Scala not a good language for teaching programming, but that would be special pleading -- no such negatives are mentioned for Python in this or similar one-sided accounts from Python fans. The very act of googling for such accounts incurs a damning level of bias.
 
My intuition tells me that Python is probably a decent pedagogical language for elementary and high school but is probably not a great choice at the college level (except perhaps for non-CS students). Then again, my intuition could be completely wrong.

I recognize the limits of Python, but I also recognize that it *is* possible to write quality non-trivial code in Python that works correctly and gets the job done. I don't think it rots your brain -- at least not as bad as C++ does. (Then again, if it rotted my brain, I probably wouldn't realize it anyway, would I.)


Mighty faint praise.


Indeed. I have no particular reason to praise Python -- but I have no reason to dump on it excessively either. It is not my choice anymore now that I have discovered Scala, but you cannot deny that some fairly impressive things have been done with Python.


You're quite the master of the stunningly stupid strawman, Russ. Some fairly impressive things have been done in assembly language, too, but that has no bearing at all on anything being discussed here.

-- Jim

Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

On 04/04/2011 03:44, Jim Balter wrote:
> In the future, please troll scala-debate, not
> scala-user.

The original request was just asking if existing work has been done in the field. It
wasn't asking whether it was a good idea... The debate was added by other people (and
fueled by many... including myself and Lex).

Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
Re: Re: Scripting profiles for Scala.
+ scala-debate
Guys, this email chain is getting very long and really off topic.  Rather than name calling and accusing each other of trolling, let's move this to scala-debate where the fun can continue and the scala-user list can remain just the scala-user list.

On Mon, Apr 4, 2011 at 8:54 AM, Philippe Lhoste <PhiLho [at] gmx [dot] net> wrote:
On 04/04/2011 03:44, Jim Balter wrote:
In the future, please troll scala-debate, not
scala-user.

The original request was just asking if existing work has been done in the field. It wasn't asking whether it was a good idea... The debate was added by other people (and fueled by many... including myself and Lex).

Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

On 03/04/2011 20:22, Peter C. Chapin wrote:
> Can you get the effect you want *just* using a DSL? For example Kojo [1] is an environment
> targeting children but that uses Scala. In effect the kids program in Scala, although they
> are using a DSL to do it. I don't believe the environment hides any part of Scala from the
> users, though. Disclaimer: That's my understanding of the system... I haven't actually
> played with it.

I was wondering when someone will mention Kojo... If not, I would have pointed to it.
It is a friendly environment (based on NetBeans platform, with auto-completion, variable
inspection and such) aimed at kids. Yet, it leaves full access to Scala.

Although I don't share the tone of the discussion, I admit my skin reaction on the first
message was similar to Randall's one: why limit a language? if "javascript like features"
is good, why not use it? (Or Mirah, or Gosu, or Fantom, etc., to remain in the static
typing realm) :-)

OK, part of the above questions have been addressed in this thread, so I won't go back to
them.
But again, Kojo offers the whole Scala (with the restrictions of the interpreter) without
limiting it, which is nice as one can progressively use more advanced features without
having to check more boxes to get access to them.

Honestly, what are the chances a student will use 'match/case' accidentally?
For me, it is more a matter to offer a sub-set of the documentations (tutorials, APIs,
etc.) than to physically restrict the language. If a student hears of folderLeft (one can
surf...) and wants to try it, why forbid access to the feature?

Yes, they can misuse a feature, make errors, forget one dot where it is needed, try
things. But it won't break anything, they will get error messages, will learn and progress
from mistakes. That's the essence of education, no?

I won't be dogmatic about the above, I am just expressing my opinion...

BTW, I can be wrong, but designing and implementing a subset of a language (in a
configurable way!) might be as hard as making the compiler itself. (It is prone to many
bugs, holes, inconsistencies, impossibilities, etc.)

Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
Re: Re: Scripting profiles for Scala.
Razvan Cojocaru 3
Joined: 2010-07-28,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.
What makes scala not suitable for teaching programming?
It is probably the most approachable complex programming language I know, supporting a lot of the paradigms and techniques one needs to teach. To me it sounds ideal for the task. 
My 10 year old started last year moving turtles happily in Kojo, with scala, easily evolved to loops and such and will soon be programming his NXT robot in a scala DSL... (soon as I find some time that is).
He doesn't understand, know or care about monads although he uses them regularly. 
I don't see what the fuss is all about. 
Lex - so you now want to take all the fun out of programing (had to say that) :)
Martin's levels give us the switches and we can recombine them in different profiles. I think it  should all be in the compiler, much like you can tweak the java compiler today... Or a compiler plugin? The presentation compiler also ( I think they share a lot). 
I think it is neccessary and I would volunteer to help with this if someone sets it up. 
Thanks,Razvan
On 2011-04-04, at 5:35 AM, Jim Balter <Jim [at] Balter [dot] name> wrote:

On Mon, Apr 4, 2011 at 2:15 AM, Russ Paielli <russ [dot] paielli [at] gmail [dot] com (russ [dot] paielli [at] gmail [dot] com" rel="nofollow">russ [dot] paielli [at] gmail [dot] com)> wrote:
On Mon, Apr 4, 2011 at 1:17 AM, Tony Morris <tonymorris [at] gmail [dot] com (tonymorris [at] gmail [dot] com" rel="nofollow">tonymorris [at] gmail [dot] com)> wrote:
On 04/04/11 10:48, Cay Horstmann wrote:
> Right now, Python is viewed by quite a few people as an ideal language
> for teaching programming.
Not wanting to throw fuel on the fire, but no serious teacher of
programming I know believes this (python is an ideal language for
teaching programming) to be true. The "teaching" of python is widely
regarded (according to my selection) as destructive to the educational
endeavour. I am very sympathetic to this view. Indeed, I can confidently
make certain guarantees about the result of teaching programming with
python.



I'd be interested in those "guarantees" if you care to briefly outline them.

If you google it, you will find that Python is regarded by many as a good language for teaching programming. See, for example,

http://www.stanford.edu/~pgbovine/python-teaching.htm



Ha ha, great example: "Run-time type errors rather than compile-time type errors"

Aside from that lunacy, most of his other reasons apply to Scala just as much, and often more so. You could point out the things that make Scala not a good language for teaching programming, but that would be special pleading -- no such negatives are mentioned for Python in this or similar one-sided accounts from Python fans. The very act of googling for such accounts incurs a damning level of bias.
 
My intuition tells me that Python is probably a decent pedagogical language for elementary and high school but is probably not a great choice at the college level (except perhaps for non-CS students). Then again, my intuition could be completely wrong.

I recognize the limits of Python, but I also recognize that it *is* possible to write quality non-trivial code in Python that works correctly and gets the job done. I don't think it rots your brain -- at least not as bad as C++ does. (Then again, if it rotted my brain, I probably wouldn't realize it anyway, would I.)


Mighty faint praise.

-- Jim

Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
Re: Re: Scripting profiles for Scala.
+ scala-debate
Guys, this email chain is getting very long and really off topic.  Rather than name calling and accusing each other of trolling, let's move this to scala-debate where the fun can continue and the scala-user list can remain just the scala-user list.

On Mon, Apr 4, 2011 at 8:54 AM, Philippe Lhoste <PhiLho [at] gmx [dot] net> wrote:
On 04/04/2011 03:44, Jim Balter wrote:
In the future, please troll scala-debate, not
scala-user.

The original request was just asking if existing work has been done in the field. It wasn't asking whether it was a good idea... The debate was added by other people (and fueled by many... including myself and Lex).

jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Re: Scripting profiles for Scala.
Regardless of what the original request was, Lex wrote this in response to me:
"Now, aside from personal insults, crude suggestions to use something
else, and a blind faith, I am yet to see any reasonable arguments
against limited Scala profiles."
The fact is there had been no personal insults up to that point, but "blind faith" is one, and there was nothing "insulting" about the mention of some other programming languages, and dismissing arguments -- such as that there's a lot of work involved in such an endeavor and that it breaks existing documentation -- as not reasonable is simply trolling; Lex didn't want to have a discussion, he only wanted concurrence. And in any case, this sort of thing, just like HoD's contentious post about perfect levels of abstraction, belong in scala-debate, not here.
-- Jim

On Mon, Apr 4, 2011 at 5:54 AM, Philippe Lhoste <PhiLho [at] gmx [dot] net> wrote:
On 04/04/2011 03:44, Jim Balter wrote:
In the future, please troll scala-debate, not
scala-user.

The original request was just asking if existing work has been done in the field. It wasn't asking whether it was a good idea... The debate was added by other people (and fueled by many... including myself and Lex).

Cay Horstmann
Joined: 2009-09-04,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Scripting profiles for Scala.

> Honestly, what are the chances a student will use 'match/case' accidentally?
> For me, it is more a matter to offer a sub-set of the documentations
> (tutorials, APIs, etc.) than to physically restrict the language. If a
> student hears of folderLeft (one can surf...) and wants to try it, why
> forbid access to the feature?

Students can be very frustrated by error messages that don't match
their mental model. For example,

val match = false
error: illegal start of simple pattern

Restricting the documentation is good, but it leaves room for unhappy
experience. Let's say we teach them foreach but not forall. But for
some reason they use it anyway (hey, I do half the time...)

(1 to 10).forall(println _)
error: type mismatch;
found : () => Unit
required: (Int) => Boolean

> Yes, they can misuse a feature, make errors, forget one dot where it is
> needed, try things. But it won't break anything, they will get error
> messages, will learn and progress from mistakes. That's the essence of
> education, no?

Yes and no. There has been some experience with informally subsetting
C++, and it was really hard to do without demotivating students and
instructors. Not every instructor is as interested in the nuances of
the language (which after all, many consider just the medium with
which to deliver their message) as this august group.

> I won't be dogmatic about the above, I am just expressing my opinion...
>
> BTW, I can be wrong, but designing and implementing a subset of a language
> (in a configurable way!) might be as hard as making the compiler itself. (It
> is prone to many bugs, holes, inconsistencies, impossibilities, etc.)

Yes, it would be a challenge. It took the PLT people quite a bit of
experimentation to come up with a usable system.

Cheers,

Cay

Peter C. Chapin 2
Joined: 2011-01-07,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting profiles for Scala.

On Sun, 3 Apr 2011, Lex wrote:

> Please prove me wrong and give some reason WHY you think having Scala
> profiles is a bad idea. I understand that some of you hate it. The
> question is WHY. All I am looking for is for you to elaborate your
> position. For my part I have done plenty of elaboration without going out
> of the way to insult anyone.

Although I don't have a problem with the idea of subsetting Scala, I
can think of one potential difficulty: it might be very hard to do
coherently.

Actually by some measures Scala is a small language. It has a large
"learning load" (as I call it) but because it is so regular the number of
raw features is not large.

You mentioned in one of your earlier postings, for example, disabling
operator overloading in the subset. Yet Scala doesn't really have operator
overloading. What it does have is a flexible way of naming methods and a
flexible syntax for using calling them. I suppose you could restrict the way
methods can be named, but that seems a little unnatural.

I'm not saying it's impossible, but it's a potential issue to consider.
Scala feels large, but it really isn't. That contrast might (or might not)
make the creation of subsets harder than in other languages.

Peter

Seth Tisue
Joined: 2008-12-16,
User offline. Last seen 34 weeks 3 days ago.
Re: Re: Scripting profiles for Scala.

>>>>> "Philippe" == Philippe Lhoste writes:

(replying on scala-debate instead. please, could others still discussing
this on scala-user do the same?)

Philippe> I was wondering when someone will mention Kojo... If not, I
Philippe> would have pointed to it. It is a friendly environment
Philippe> (based on NetBeans platform, with auto-completion, variable
Philippe> inspection and such) aimed at kids. Yet, it leaves full
Philippe> access to Scala.

I think the big problem is the error messages. The Racket/PLT people
have written a lot about this.

Philippe> If a student hears of folderLeft (one can surf...) and wants
Philippe> to try it, why forbid access to the feature?

It doesn't need to be "forbid". It could alert you that you used
something that isn't in your current subset, and ask if you want to move
to the larger subset.

Philippe> Yes, they can misuse a feature, make errors, forget one dot
Philippe> where it is needed, try things. But it won't break anything,
Philippe> they will get error messages, will learn and progress from
Philippe> mistakes. That's the essence of education, no?

Well, you can't just sweep real teaching difficulties under the rug by
saying that anytime something goes wrong, "that's the essence of
education." Problems and barriers multiply and accumulate, and the more
they pile up, the more students you start to lose.

An honest question (this is not directed at Philippe specifically):

Y'all who seem opposed (and some of you downright enraged and
belligerent; can't you see it's self-defeating?) to this idea of
subsetting, how much time have you spent teaching programming to college
students? high school students? middle school students? etc.
"I taught my kid" doesn't count. It's easy to get locked into a
professional-programmer, hacker-from-birth perspective and lose sight of
the fact that it's a big world out there.

Kevin Wright 2
Joined: 2010-05-30,
User offline. Last seen 26 weeks 4 days ago.
Re: Re: Re: Scripting profiles for Scala.
How here's an idea...

Instead of outright banning certain features, how about a code-coverage-style static analysis tool?  Annotated source with lines colour coded according to some preconceived notion of "risk".

On 4 April 2011 15:10, Seth Tisue <seth [at] tisue [dot] net> wrote:
>>>>> "Philippe" == Philippe Lhoste <PhiLho [at] GMX [dot] net> writes:

(replying on scala-debate instead. please, could others still discussing
this on scala-user do the same?)

 Philippe> I was wondering when someone will mention Kojo... If not, I
 Philippe> would have pointed to it.  It is a friendly environment
 Philippe> (based on NetBeans platform, with auto-completion, variable
 Philippe> inspection and such) aimed at kids. Yet, it leaves full
 Philippe> access to Scala.

I think the big problem is the error messages.  The Racket/PLT people
have written a lot about this.

 Philippe> If a student hears of folderLeft (one can surf...) and wants
 Philippe> to try it, why forbid access to the feature?

It doesn't need to be "forbid".  It could alert you that you used
something that isn't in your current subset, and ask if you want to move
to the larger subset.

 Philippe> Yes, they can misuse a feature, make errors, forget one dot
 Philippe> where it is needed, try things. But it won't break anything,
 Philippe> they will get error messages, will learn and progress from
 Philippe> mistakes. That's the essence of education, no?

Well, you can't just sweep real teaching difficulties under the rug by
saying that anytime something goes wrong, "that's the essence of
education."  Problems and barriers multiply and accumulate, and the more
they pile up, the more students you start to lose.

An honest question (this is not directed at Philippe specifically):

Y'all who seem opposed (and some of you downright enraged and
belligerent; can't you see it's self-defeating?) to this idea of
subsetting, how much time have you spent teaching programming to college
students?  high school students?  middle school students?  etc.
"I taught my kid" doesn't count.  It's easy to get locked into a
professional-programmer, hacker-from-birth perspective and lose sight of
the fact that it's a big world out there.

--
Seth Tisue | Northwestern University | http://tisue.net
lead developer, NetLogo: http://ccl.northwestern.edu/netlogo/



--
Kevin Wright

gtalk / msn : kev [dot] lee [dot] wright [at] gmail [dot] comkev [dot] lee [dot] wright [at] gmail [dot] commail: kevin [dot] wright [at] scalatechnology [dot] com
vibe / skype: kev.lee.wrightquora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

"My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger" ~ Dijkstra

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland