[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature incompatibilities



I've developed a web development language called Bento which does
something a little like the modes you describe, though not on a
particularly grand scale.  Bento has different block types for code
and data, indicated by different pairs of delimiters.  But since
the data is generally code of some sort too (typically HTML or CSS
but potentially anything that a client might recognize), as you
program in Bento you have the distinct feel of switching between
languages -- much like your example of dropping into assembly from
C, except that you get closer to the client rather than the hardware
(which is quite a bit safer -- when I think back to writing inline
assembly I can't help but shudder...)

I think for this particular purpose using different block
delimiters as Bento does is better than a scope qualifier.  It
accomplishes the same thing, but it makes more sense visually,
since it implies a syntactical boundary rather than a semantic
attribute, and going from one language to another is definitely
crossing a syntactical boundary.  You might think it would make
reading code confusing, but it doesn't, at least not when the number
of block types is small as in Bento.  It's no harder than mentally
processing comments as you read code -- that is to say, automatic.

You can see for yourself how Bento works at http://www.bentodev.org.

Michael St. Hippolyte


On 2003.04.02 20:59 Billy wrote:
> I had this idea awhile ago about a modal language. One that could
> express programming at a high level (ie. lisp,perl), but also allow
> the programmer to change modes to something closer to the hardware.
> Kind of like C's ability to incorporate assembly, but on a grander
> scale.  Maybe by having a scope qualifier specifying the mode.
> 
> This was born out of some frustrations I encountered while writing
> some perl scripts, where I really wanted to optimize specific parts
> of the program, without having to extend perl.
> 
> -billy
> 
> On Mon, Mar 31, 2003 at 04:22:38PM -0800, Michael Vanier wrote:
> > Date: Mon, 31 Mar 2003 16:22:38 -0800
> > From: Michael Vanier <mvanier@cs.caltech.edu>
> > To: ll1-discuss@ai.mit.edu
> > Subject: feature incompatibilities
> >
> >
> > It occurs to me that a lot of the current landscape of programming
> > languages is determined by which language features don't play well
> > together.  I can think of several of these incompatibilities:
> >
> > -- explicit pointer arithmetic and garbage collection
> >
> > -- strong static typing and reflection
> >
> > -- static typing and dynamic typing
> >
> > -- imperative programming and implicit lazy evaluation
> >
> > None of these is absolute.  For instance, there are (conservative)
> GCs for
> > C/C++, java has strong(ish) static typing but also has reflection,
> Dylan,
> > Curl and Common Lisp combine (to some extent) static and dynamic
> typing
> > (and reflection), Haskell uses monads to get the effect of
> imperative
> > programming, etc.  However, it seems like it's very hard if not
> impossible
> > to have such feature pairs together in one language without
> compromising
> > one or the other of the pair.  For instance, conservative GC is not
> > guaranteed to be reliable.
> >
> > I think a lot of us dream of creating one language that could do
> everything
> > well, but I think the incompatibilities I listed above suggest that
> such a
> > dream is misguided.  Can anyone think of other incompatibilities of
> this
> > kind?  Any other opinions?
> >
> > Mike
> 
>