The Artima Developer Community
Sponsored Link

Weblogs Forum
What would it take for a new language to impress you?

44 replies on 3 pages. Most recent reply: Nov 7, 2005 11:24 AM by MJ Stahl

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 44 replies on 3 pages [ « | 1 2 3 | » ]
Peter Hickman

Posts: 41
Nickname: peterhi
Registered: Mar, 2003

Re: What would it take for a new language to impress you? Posted: Jul 30, 2005 12:03 PM
Reply to this message Reply
Advertisement
A language that could be easily parsed but still be readable for humans. LISP is the only language I know in this catagory.

A language that allows hooks to be added into programs for profiling and testing. Sort of "before you run f() call g() with the same parameters".

A language that allows you to shoot yourself in the foot it you want to.

A language that allows you to define macros that alters the way that the code is compiled, like the macros of LISP and Pop11.

A language that allows you to go OO but does not force you to do it. Like Ruby, Python and Perl.

A language where you write programs to solve problems rather than keep the compiler happy. Like Pascal with it's forward declaration that was only part of the language to make things easier for the 1 pass compiler. Like most of the syntax of Java.

A language with a smart compiler. I'm sure that a compiler can work out if a string should be a String or a StringBuffer.

A language not written for morons.

Noam Tamim

Posts: 26
Nickname: noamtm
Registered: Jun, 2005

Re: What would it take for a new language to impress you? Posted: Jul 30, 2005 1:21 PM
Reply to this message Reply
> -It should not require silly and pointless coding
> overhead, like Java defining main in a class. Objects are
> great, but there is still a place for classless,
> procedural code.

I, for one, think exactly the opposite way about Java's "public static void main()". I think there should have been an Application interface/abstract class that an application must implement, with methods like start(String[] args) and end() - very much like Applet.

Noam.

Noam Tamim

Posts: 26
Nickname: noamtm
Registered: Jun, 2005

Re: What would it take for a new language to impress you? Posted: Jul 30, 2005 1:40 PM
Reply to this message Reply
> A language that allows hooks to be added into programs for
> profiling and testing. Sort of "before you run f() call
> g() with the same parameters".

You mean something like Aspect Oriented Programming (and AspectJ as an implementation). Google for it, and you'll also find an ad calling you to work at Google ;-)

> A language that allows you to shoot yourself in the foot
> it you want to.

I think a language should make it difficult to shoot yourself in the foot.

> A language that allows you to define macros that alters
> the way that the code is compiled, like the macros of LISP
> and Pop11.

I don't know LISP or Pop11, but I do miss such things in Java.

> A language that allows you to go OO but does not force you
> to do it. Like Ruby, Python and Perl.

OO tends to be better for large projects. Anyway - Java forces you to use classes, but doesn't force you to go OO. You can write your entire program as static methods, where the classes are just wrappers.

> A language where you write programs to solve problems
> rather than keep the compiler happy. Like Pascal with it's
> forward declaration that was only part of the language to
> make things easier for the 1 pass compiler. Like most of
> the syntax of Java.

Can you give an example of where in Java you see that?


Noam.

Robert Parnell

Posts: 22
Nickname: robparnl
Registered: Jul, 2005

Re: What would it take for a new language to impress you? Posted: Jul 30, 2005 8:39 PM
Reply to this message Reply
Using C++, of course. Throw in STL, OOTL, Boost, and so on.

Next, ??? There seems to be a lot of discussion about this feature, that style, this practive (XP, Agile, and more?). This sounds good.

Although, why not making something "shareable". Share capable in the sense of:

1) We don't have to wait for the magnificent Mr. Diggins to make everything.

2) How? Use plug-ins to support adding new modules / language features.

3) Have a "primitive as can be" foundation. So, if I don't want XP or procedural langauge. I can turn off the plug-in (or disable?) Then, add in my own logical module. (Prolog ala C++ would be interesting. But, probably slow?)

4) The hardest qualification of all. Make this thing, as quick as you can. Which, anyone contributing to it. Also, would "have to do."

*** After all, isn't that what we all want? Just to get Heron done. Or J/ron done? Or Modus-Herus? (Odd names for negative feedback.)

My two cents - Rob P.

PS. So, if it could be a langauge laboratory? Or has to work on compiled, like C++. Or could run interactively, like Python? Again, I'm undecided here. There seems to be a lot of talent on this weblog, all posts. Would be nice, if everyone could build it, in parts. Good idea? Or not?

Glyph Lefkowitz

Posts: 12
Nickname: glyph
Registered: Nov, 2003

Re: What would it take for a new language to impress you? Posted: Jul 30, 2005 10:35 PM
Reply to this message Reply
It would have to provide ...

1. vectorized operations on all data-types; e.g. a declarative, optimization-friendly way of specifying things normally done with 'for' loops.

2. a standard runtime that functioned adequately on MacOS, Linux, and Windows at an *absolute* minimum.

3. run-time dispatch and a consistent and coherent meta-type hierarchy in the style of smalltalk.

4. asynchronous I/O and events as a base runtime feature.

5. *optional* static typing.

6. *optional* interface enforcement between modules; able to be turned off when you really need to fix a problem, but generally preventing users from accidentally using undocumented and unsupported framework features.

7. (as implied by 6) a good module system; 1-to-1 mapping between filesystem objects and code objects; with the ability to roll these objects up and provide simpler interfaces.

8. a mutable data structure representing code.

9. at least one other interesting feature that I haven't considered, adding to these, which would make me consider it over languages which already provide most of this stuff.

John Roth

Posts: 8
Nickname: johnroth
Registered: Jan, 2005

Re: What would it take for a new language to impress you? Posted: Jul 31, 2005 6:35 AM
Reply to this message Reply
Recognizing that the world has changed in the last 20 years.

What I mean by that is that there are some givens, like simplicity that makes doing simple things easy and doesn't get in the way of harder stuff, but the real interesting stuff wasn't on the radar screen fifteen or twenty years ago.

First, I want an interesting language to be defined by its AST, not by its textual representation (if any.)

Second, I want developer convenience to be the responsibility of the editor, not something that has to be a major concern of the AST representation.

Let's take a couple of examples. First is the entire issue of how to represent strings. Let the editor do it and quit worrying about quoting and escaping conventions. These should all vanish at the AST level anyway.

Another good example is implicit namespaces. One of the continuing issues with Python is the difficulty with telling whether an identifier is a lexical keyword, a local variable, an instance variable, a module level variable or a built-in. A decent editor colorizes this information, so there is no reason to make that decision via a set of implicit rules. Make it explicit in the AST, and let the editor colorize it. If it makes a mistake, it's a keystroke or two to tell it what you intended.

The third thing that would impress me is built-in support for efficiently proving characteristics of a program (or program suite). TDD is great, but Assertion Driven Development would be even better. The key issue here is efficient, and that has as much to do with language design as it does with having an incremental prover where the intermediate results are saved so one does not have to wait for the prover to initialize itself over and over and over.

I could go on, but this is quite enough to be a really impressive achievement, at least in my book.

John Roth

Peter Hickman

Posts: 41
Nickname: peterhi
Registered: Mar, 2003

Re: What would it take for a new language to impress you? Posted: Jul 31, 2005 6:42 AM
Reply to this message Reply
> > A language that allows you to shoot yourself in the foot
> > it you want to.
>
> I think a language should make it difficult to shoot
> yourself in the foot.

This is the sort of thing that seems to split programmers. I like a language to allow me to do what I want, the way I want to. I used to do assembly and C, I liked the power it gave me and I was prepared to put the effort into writting the code.

Other programmers are into B&D type languages and seem to assume that there is one, and only one, way to do something.

> > A language that allows you to define macros that alters
> > the way that the code is compiled, like the macros of
> LISP
> > and Pop11.
>
> I don't know LISP or Pop11, but I do miss such things in
> Java.

The trouble is that macros work well in typeless (or at least not strongly typed) languages. To be honest I'm not sure that you could get macros in a strongly typed language. But you never know.

> > A language where you write programs to solve problems
> > rather than keep the compiler happy. Like Pascal with it's
> > forward declaration that was only part of the language to
> > make things easier for the 1 pass compiler. Like most of
> > the syntax of Java.
>
> Can you give an example of where in Java you see that?

Casting. Sometimes I come across Java that is a sea of casts, maybe generics will clean all this up but I doubt it. I had hopes for Java as being something better than C++ but it just seems to be different.

Primitives. This was just a convenience for the compiler.

Ron Ruble

Posts: 10
Nickname: ronr
Registered: Aug, 2004

Re: What would it take for a new language to impress you? Posted: Jul 31, 2005 9:19 AM
Reply to this message Reply
> I, for one, think exactly the opposite way about Java's "public static void main()". I think there should have been an
> Application interface/abstract class that an application must implement, with methods like start(String[] args) and
> end() - very much like Applet.

I agree with you about Applets, and if there was an Application interface class, it wouldn't bother me.

But there is no abstract interface class of which main is a static member function. It's a pointless example of fluff for the sake of fluff. If there was an Application class, it could do -somthing-, like provide standard interfaces for gathering information at runtime about the application.

While it might not be an elegant solution, it would at least exist to a purpose. Currently, there is no purpose behind it. It's syntactic sugar which -increases- the amount of typing, in exchange for not increasing clarity or readability. WTF?

Thanks for your reply.

Ron Ruble

Posts: 10
Nickname: ronr
Registered: Aug, 2004

Re: What would it take for a new language to impress you? Posted: Jul 31, 2005 9:22 AM
Reply to this message Reply
> > A language that allows you to shoot yourself in the foot
> > it you want to.

> I think a language should make it difficult to shoot yourself in the foot.

Difficult, maybe. Not impossible. Sometimes you might really intend to shoot yourself in the foot.

Kay Schluehr

Posts: 302
Nickname: schluehk
Registered: Jan, 2005

Re: What would it take for a new language to impress you? Posted: Jul 31, 2005 10:34 AM
Reply to this message Reply
> Another good example is implicit namespaces. One of the
> continuing issues with Python is the difficulty with
> telling whether an identifier is a lexical keyword, a
> local variable, an instance variable, a module level
> variable or a built-in. A decent editor colorizes this
> information, so there is no reason to make that decision
> via a set of implicit rules.

Well, my advice here is very simple: just use explicit namespace references i.e.

import Module.Module1 as Module1

instead of

from Module.Module1 import*

and you won't get stuck with hundreds of objects with unknown origin.

If you use a 'from MODULE import*' statement make at least sure that you have defined an __all__ attribute in MODULE. I don't think we need a new language for preventing newbie mistakes. Teaching should be sufficient. In this respect I go with Paul Graham who dedicates his own language design musings to mature hackers.

By the way a dynamic language like Python is able to create namespaces on the fly that no parser can anticipate.

Kay

Jeff Moss

Posts: 2
Nickname: zardinuk
Registered: Aug, 2005

Re: What would it take for a new language to impress you? Posted: Jul 31, 2005 9:33 PM
Reply to this message Reply
I would like to see more of the standard rules of english incorporated into the language. I think it could be possible for the language to understand ordinary speech. Being able to understand what type of word it is, even if it doesn't necessarily understand the true meaning of the word, like to be able to tell apart nouns, verbs, adjectives, and then to be able to understand modifiers like pluralization, negatives, commands, stuff like that. I don't think it would take much effort to start with statements like these:

Say "Hello world" five times.
Get input from user and store in variable user_input.
Open connection to database at server myhost.com on port 4090, login as user administrator with password letmein.

In the third example, the word "Open" loads a stdio library, the word "connection" loads a network library, and "database" opens a database library, the rest are parameters to the methods in these libraries. The libraries themselves may be programmed using the same style of syntax, not sure. There would still have to be very low level syntax involved, but really, telling a computer to do something shouldn't require such special syntax as C or python or ruby or whatever.

Noam Tamim

Posts: 26
Nickname: noamtm
Registered: Jun, 2005

Using English-like programming language Posted: Jul 31, 2005 11:03 PM
Reply to this message Reply
> Say "Hello world" five times.
> Get input from user and store in variable user_input.
> Open connection to database at server myhost.com on port
> 4090, login as user administrator with password letmein.

The question is, why? Why would you (as a programmer) rather write those long statements, instead of:
1. for i=1 to 5 {Print "Hello World"}
2. cin>>user_input // what type of input do you want?
3. openConnection("myhost.com",4090,"admin","letmein")

The "normal" (not-english) version are typically shorter, clearer, and easier to read. They are also easier to parse by the compiler, but that's not my point.

The point is, that as a programmer, I prefer non-natural languages.

Noam.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Using English-like programming language Posted: Aug 1, 2005 1:34 AM
Reply to this message Reply
:
> The "normal" (not-english) version are typically shorter,
> clearer, and easier to read. They are also easier to parse
> by the compiler, but that's not my point.
>
> The point is, that as a programmer, I prefer non-natural
> languages.
>
> Noam.

I too prefer the English like syntax for two very simple reasons. Firstly, you don't have to be a programmer to understand it - you shouldn't have to 'be a programmer' to get a computer to do something for you. Secondly, with verbose English the intention receives as much attention as the action. Much bugged code is difficult to maintain because although we can see what it is actually doing, it is not always clear what the author was trying to do.

The job of a programmer is to translate intentions into actions. The more this translation process can be abstracted into the machine the better.

Vince.

Frank Wilhoit

Posts: 21
Nickname: wilhoit
Registered: Oct, 2003

Re: What would it take for a new language to impress you? Posted: Aug 1, 2005 10:39 AM
Reply to this message Reply
1. Seamless concurrency
2. Seamless reflection
3. Polymorphic data

John Bayko

Posts: 13
Nickname: tau
Registered: Mar, 2005

Re: What would it take for a new language to impress you? Posted: Aug 1, 2005 7:46 PM
Reply to this message Reply
> I would like to see more of the standard rules of english
> incorporated into the language.

English (or other natural language) would be the worst way to program, because it is either so ambiguous and imprecise, or you need to spend to many words to explain those ambiguities that all you've done in the end was bloat the number of words needed by an order or magnitude.

For example:

> Get input from user and store in variable user_input.

What type of input? A mouse click? String? Number? Date? Currency? Voice recording? What sort of variable? Is there an implicit conversion? Does "store" mean that if the variable represents a file, write this to that file, or open a file with a new name? Or close the file and convert the variable to a string/number/date/etc.? Does user_input have a life span, or is it global? Is there a statement somewhere else that uses that name and will be surprised now that you've changed it? Have you just crashed the program? How long can this input be, if the user leaves a microphone on, should input continue until it fills up memory?

Each and every one of those questions, and many others, must be answered either explicitly, or implicitly from the language rules and libraries, for each and every such statement. Programming isn't hard because you can't use English words. It's hard because it must be specified explicitly and completely.

> Open connection to database at server myhost.com on port
> 4090, login as user administrator with password letmein.

Any idea what this will do if it can't? As an exercise, see if you can identify at least six things that could prevent this from working, and what to do for each case?

1. Wrong server name
2. Wrong port number
3. Wrong user name
4. Wrong password
5. Network down
6. Database service down
7. Server ports disabled
8. Insufficient user permissions for outgoing or incoming socket connections
... etc.

Simplicity often breaks down when it meets the real world, because there's a lot more of it out there than you like to think about.

COBOL tried to be like English. Statements like "ADD EXPENSE-BONUS TO BASE-PAY GIVING BASE-PAY" didn't simplify anything. It just led to cut-and-paste editors and lots of duplicated code. AppleScript seems to try a bit harder at being English-like, and the results are much better, but still makes a lot of things far too wordy, and not any easier to program.

Most of the power of modern languages like Python (or Smalltalk) comes in being able to express common, very useful ideas in fewer symbols than English - it's also why mathematical notation (the inspiration for programming languages in the first place) was created.

Flat View: This topic has 44 replies on 3 pages [ « | 1  2  3 | » ]
Topic: Functions as Classes: Where did I steal it from? Previous Topic   Next Topic Topic: The Trouble with Searching for Open-Source Code


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2017 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us