ObjectScript is a general purpose object-oriented programming language. It is designed to be simple to learn, easy to use, yet still powerful, combining the convenience of an interactive interpreter with many of the features of Java.
ObjectScript is a general purpose object-oriented programming language. It is designed to be simple to learn, easy to use, yet still powerful, combining the convenience of an interactive interpreter with many of the features of Java.
Hmm this looks a lot like JavaScript, no type declarations like Python. Nothing special I guess.
a simple java-like syntax
How is Java’s syntax simple?
with beanshell ?
ObjectScript itself is written in Java. So it is no wonder, that it can use many futures of Java.
To create a class you write
public function className
{ public function methodName()
{ // code here
}
var member = 0;
}
(taken from http://objectscript.sourceforge.net/docs/osug.html#Object%20Ori…)
I’m sorry, I appreciate the work that’s gone in to programming and documenting this, but from what I can see it just translates pseudo-Java into Java. Even if this is not the case, it’s not sufficiently different to Java to develop a market as far as I can see. If they switched the back-end to GCJ (available on Windows & Unices) or even G++ then there would be an attraction, but as it stands, it isn’t something that would appeal to me at any rate.
I must say though, the GUI is damn impressive. I wonder could it be hooked up for JavaScript debugging.
can anyone remember netrexx. it’s similar approach to put rexx like syntax on top of java. i guess there are only a few people in the world who uses netrexx.
Start with JavaScript. Add throw/catch error trapping with exception objects. Add mandatory variable declaration. Organize some of the major objects such as Number and String. Add a few new major objects like System or OS, sort of like .Net has. I need a super light gui editor with built in syntax highlighting and function parameter knowledge. Add a “procedure” statement to distinguish functions from procedures. Add distinct OOP so that a class isn’t a function.
I think you get the idea. I’ve tried to write a programming langauge before, but it’s tricky business.
just making sure you have no left recursion in your tokens is a pain, but describing the syntax and semantics with BNF and attributes!! pain pain pain…..there is a reason people are either REALLY dedicated or get paid to do it.
The fact that this combines alot of the features of Java with a toplevel (the interactive interpreter) reminds me of an article that Paul Graham wrote. ( http://www.paulgraham.com/rootsoflisp.html ) In it he states that as programming languages advance they grow more Lisp-like. For instance adding Lisp features to some current mainstream language. Of course you can also argue that the error-handling abilities of Java are an improvement over most Lisp dialects. Overall, this looks like an extremely interesting project. From experience I can say that having an interactive interpreter is a big improvement.
The arrays in ObjectScript also remind me of lists in Lisp in that they are of variable length and can include mixed types. There is also the fact that it allows anonymous functions and that functions can have variable length arguments.
It’s interesting, and I understand its utility in the Java world, but I’ll stick with ruby.
You can use Java and Python together already.
“Start with JavaScript. Add throw/catch error trapping with exception objects. Add mandatory variable declaration. Organize some of the major objects such as Number and String. Add a few new major objects like System or OS, sort of like .Net has. I need a super light gui editor with built in syntax highlighting and function parameter knowledge. Add a “procedure” statement to distinguish functions from procedures. Add distinct OOP so that a class isn’t a function.
I think you get the idea. I’ve tried to write a programming langauge before, but it’s tricky business.”
JScript itself has try/catch exception handling. JScript.net has static typing. You can use all of the .net classes in JScript.net. There is a distinct class statement in JScript.net that differs from the standard jscript object creation methodology (why you WOULDN’T want to use JScript’s prototyping over a class system, I have no idea. Prototyping i find a lot more natural and more flexible).
Damn straight it’s hard to write a language, sounds like MS has already released the language that you want. I might add that the compiler is included in the very free .Net SDK.
If it doesn’t run on multiple platforms, it isn’t my ideal language … Java, Python (inc. Jython), C, C++ are examples. Anything .Net doesn’t meet this requirement. Microsoft has demonstrated that .Net can run on mutliple platforms with Rotor. But, unless Mono or DotGnu can present a full .Net environment without violating a MS patent, I will not be able to run JScript.Net anywhere.
If we are talking about JScript, I want to write fully ECMAScript compliant code anyway. Anyhow, I don’t think MS is going to write my ideal language – they keep trying to use the language to restrict me to Windows.
I do spend most of my time writing for Windows, so I’m not trying to say that you should avoid MS. But why would you choose a language that ties you to one platform? This is hardly ideal.
After reading DPE (1), I overcame my fear of using design patterns. Architecturally-speaking, it seems to me that at the most fundamental level, a programming language is a Facade Pattern that encapsulates the underlying machine instructions. Expanding this notion, ObjectScript is a facade (though not necessarily implimented as a Facade Pattern) on top of Java – itself being a facade for the native machine instructions which are executed by the VM on the target platform.
Why am I bothering to mention this? I simply love the idea of allowing someone to create their own dialect of a programming language based on what feels most natural to their way of thinking. (Perhaps this should be called a mod-able language?)
Maybe this concept could help re-order programming languages in general. Consider the Parrot VM (for Perl6 and other dynamic languages). Conceivably you could write your own dialect of Perl which acts as a facade to the underlying Parrot bytecode spec.
1: Design Patterns Explained: A New Perspective on Object-Oriented Design by Alan Shalloway, James R. Trott
I don’t get why people always start new languages. It seem to me this is just an hacked version of JavaScript.
It has something interesting (i.e. mix-in) but I wonder if this plus JudoScript, plus BeanShell plus the other scripting langs for the jvm realle are worth the effort.
I’ll stick with Ruby and JRuby while they grow up..
if no one created new languages, we would all still be on the Univac.
like it or not, new languages come along with new technology because the old languages hold back the hardware, though much of that has changed in the last 20 years, C sucks at language parsing, Lisp is not imperative so C programmers can not learn it quickly, Perl..perfect choice for natural language parsing.
I recently used the Rhino engine to add a scripting setup to a website (don’t ask). The customer wanted to be able to use a system of scripts for managing workflow.
Rhino is excelent for what it is, however Javascript was not the ideal language. It was the simplest available at the time. I would have considered this language if it had been available at the time just because of the mixin stuff. The interactive mode is just a bonus.