archives

Good languages with simple grammar

I'm looking for pointers to languages that are considered expressive and usable, yet are defined by simple lexical grammars and parser grammars.

One popular example is Python, which is almost LL(1) in simplicity. LISP is LL(1) and might be considered another example depending on one's views. C++ is, of course, a non-example since it isn't even definable in a context-free grammar.

SeaFunc meets Tues. Sept. 27th

SeaFunc is Seattle. SeaFunc is functional. Functional language.
Functional PRO-gramming. We shall attempt to adjust your software, as
there is something wrong. You're in a C funk. Get out of your C funk.
Stumble on down to the best Belgian booze around.

The Mothership lands at 8 pm on Tuesday, Sep. 27th at:

Ruby Restaurant
4241 University Way NE
Seattle, WA 98105 - 5806
(206) 675-1770

Ruby's is in the U. District on "The Ave," near 43rd St. Good,
non-pricey food, and normal beer.

To receive timely meeting announcements by e-mail, including where we
will be meeting, subscribe to the mailing list at
http://groups.yahoo.com/groups/SeaFunc

For the uninitiated: "Functional Programming" (FP) treats computation
as the symbolic substitution of functions. Solving problems by making
changes to program state is often avoided. Common Lisp, Scheme,
Standard ML, OCaml, Haskell, and Clean are examples of FP languages.

The merits of the FP approach are highly debateable. Much more clear,
is that people who debate these issues are interesting (to other such
people :-) and provide useful networking contacts. SeaFunc aims to be
the premiere group in the Seattle region for advanced programming
language paradgims. If you think there must be more to life than C++,
Java, and C#, please join us!

"Make my func the SeaFunc, I wants to get funked up." - Parliament

Dynamic vs. Static Typing - A Pattern-Based Analysis

In some cases, static typing is more error-prone than dynamic typing. Some statically typed languages force you to manually emulate dynamic typing in order to do "The Right Thing".

The writer takes on Java. He mentions three problems:

  • Statically Checked Implementation of Interfaces
  • Statically Checked Exceptions
  • Checking Feature Availability

Live update of source with inferred type?

(A pie-in-the-sky wish.) Personally, I love automatic type inference and generics a la ML, Haskell etc. I wish such systems would go one step further and offer an optional means of annotating the code I'm writing after the type inference happens; that way when reading code for the first time one would get the benefit of knowing what things are when they are first introduced, without having to divine it from how they are then used. I do not know of anything that does this, but would love to hear if there is such a system (or if there are evil Emacs hack ideas along such lines).

The essence of Dataflow Programming by Tarmo Uustalu and Varmo Vene

The Essence of Dataflow Programming

The abstract:

We propose a novel, comonadic approach to dataflow (streambased) computation. This is based on the observation that both general and causal stream functions can be characterized as coKleisli arrows of comonads and on the intuition that comonads in general must be a good means to structure context-dependent computation. In particular, we develop a generic comonadic interpreter of languages for context-dependent computation and instantiate it for stream-based computation. We also discuss distributive laws of a comonad over a monad as a means to structure combinations of effectful and context-dependent computation. We apply the latter to analyse clocked dataflow (partial streams based) computation.

If you've ever wondered about dataflow or comonads, this paper is a good read. It begins with short reviews of monads, arrows, and comonads and includes an implementation. One feature that stood out is the idea of a higher-order dataflow language.