“The ObjectScript is a new programing language that mixes benefits of JavaScript, Lua, and PHP. The ObjectScript has syntax from JavaScript, multiple results from Lua, OOP from PHP and much more.”
“The ObjectScript is a new programing language that mixes benefits of JavaScript, Lua, and PHP. The ObjectScript has syntax from JavaScript, multiple results from Lua, OOP from PHP and much more.”
Almost every ^aEURoenew^aEUR language we get is a rehash of subset of the c like languages nowadays. I might still look at the code since I’m interested in interpreters but the language itself is uninteresting. I’ve got very little time to learn new languages right now and when I get some time I’ve got Smalltalk and Clojure lined up.
Seems much more like JavaScript than anything else.
BTW, I wouldn’t waste my time with Clojure. It’s one of those academic toy languages, like Haskell, with a Hindley-Milner type system ostensibly designed to protect developers from themselves but ultimately being so extremely difficult to use that they exclude the kinds of developers who would arguably benefit from a nanny language.
If you’re going to learn a Lisp dialect, make it Scheme. Then take what you learned from Scheme and apply it to other languages with first-class functions, such as JavaScript, Ruby, and Python.
You are surely aware the many corporations are slowly incorporating Clojure and Haskell in their code bases?
I already do Ruby, JavaScript and Python (that^aEURTMs my day job). I’m thinking about Clojure (or Scheme for that mater) because I think I’ll like a LISP 1 more then I would like a LISP 2 (I’ve already got Land of LISP and The Little Schemer on my book case). I also don’t expect to EVER find work with LIPS or Smalltalk, they are just for play.
Edited 2012-09-30 22:30 UTC
WAT? Clojure, like all Lisps, is dynamically typed.
WAT? You’ve never even tried to use one of those, did you?
Clojure is dynamically typed. Maybe you confused it with Scala?
at benefits of PHP.
The biggest benefits are 3 folds:
– better than ASP which it was competing with at the time
– lots of built in C/C++ extensions
– readily available at webhosting companies
I can see how this was made by one or a few hackers so it started out with some inconsistencies.
The biggest problem is they never got their act together and keep making strange choices and inconsistent APIs.
I’ve got a feeling a lot of people don’t like dynamically typed languages anyway. That probably doesn’t help.
But webhosting companies won’t let you add those extensions, so they’re pretty much useless
Unless you have a server of your own, of course… but then you’ll lose the advantage of having PHP for cheap.
I am one of those people. But what I actually hate are programmers who continue to change the type of a variable inside a function without any real need or comment, one of the hugest sources of bugs in my experience.
And those who don’t write any sort of docs of their functions with 10 parameters with funny names and convoluted type.
I worked with a guy who liked to have half-indexed, half-named arrays of arrays parameters with names like “a”, “b”, or “c”, and the only way to understand what was supposed to be inside them was to read the whole function and the whole tree of calls. Sometimes the same function was present in another file, but instead of arrays it required objects, and when he changed something he only fixed his own pages.
When they objected my productivity, I just gave up and instead of using his functions I just wrote mine.
Edited 2012-10-01 11:55 UTC
Only thing I can add to that is:
Use a webhost that has most of them installed or just ask them. If you picked the right host, they might actually be good people.
Yes, clearly no-one likes Python, Ruby, Erlang, Smalltalk, Lua etc etc….
Recently looked around and the Vala/ Genie seemed the best of the C(ish) languages; most like this one seemed to offer little. (I found very limited documentation for Vala/ Genie and sadly it isn’t clear what the road map is).
Aside from cherry picking a few benefits of established languages; it isn’t really obvious what ObjectScript is trying to achieve.
[RANT ON]
It REALLY bugs me that there are so many software projects where the objective seems not to be thought out. If the objective is thought out then it often seems to be a closely secret; instead of being key public information which would help folk decide whether to use it, contribute to it or skip it.
[RANT OFF]
Finally, a language with “bolleans”. They seem useful.
OH NOES! Not a language inspired by PHP.
Hey, maybe it’ll get PHP’s “awesome” namespaces too
PHP’s OOP design was supposed to be taken from Java.
So with PHP you have this odd procedural style hangover from PHP 4 and Java like (but significantly different enough to make me think it is more similar to C++) OOP.
Plus you got all the other horrible things that still exist in PHP.
I used to hate PHP with passion, but got used to it on my own website.
My provider only offers Perl and PHP, and it is too much of an hassle to change provider just because of the language.
For what I do, it is good enough, even if I wouldn’t advise in language in the type of corporation projects we do.
I too use PHP via WordPress on my own site. But I don’t hardly do anything with my actual website because I hate PHP.
I be moving over to .NET next month with new Hosting.
As a consultant that uses whatever the customer has requested, I’ve become language agnostic, that is how slowly I’ve accepted to just use the damn thing.
On the plus side, I don’t see anything from PHP in ObjectScript. Looks like a slightly messed up Lua with JS syntax.
The class constructor destructor syntax is exactly the same.
I did not find any mentions of destructors, and the syntax to construct an object is different (PHP uses new keyword, OS doesn’t), so I presume you just mean that constructor function is called __construct. That wouldn’t be the first time lua-based object model calls it that. E.g.
https://gist.github.com/672338
http://www.jc-mp.com/forums/index.php/topic,332.msg2370.html#msg237…
On the other hand, compare this section of lua documentation to OS page:
http://www.lua.org/pil/3.6.html
I didn’t see the destructor.
But the syntax looked similar enough for me to mistake them to be the same.
Fair point though.
PHP: object oriented file includes
PHP has no benefits. And I see underscores.
Point me out, please, fellow humans:
Why is PHP so evil?
Here is a good starting point:
http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
I used PHP for years and still use it in some places where it makes sense (it’s definitely one of the easiest languages to get working quickly and is super common on vhosts)… It could be worse, but it still pains me often enough
Thx man, gonna read it! I have been using PHP from time to time in 6 years.
And I found it useful, but also very difficult to debug, even touh it’s an easy way to quick hack an cms of all those frameworks…
This +1. It explains pretty much everything that’s wrong with PHP, and there’s a lot wrong with it.
Lets put it this way, between VB(.NET) and PHP. I will take VB over it anyday.
Heck, using .cmd files would be better than using PHP
dikatlon,
“Why is PHP so evil?”
s/evil/bad/
Well, having been a regular user since the beginning, I can say without a doubt PHP is superior in all ways to what it largely replaced: ASP. However that’s where my praise ends. The language has suffered from inconsistency and poor SE decision making over the course of it’s entire history such that the developer qualifications behind PHP are brought into question. PHP has a history of semantic flip flops creating code incompatibilities.
Ignoring the multitude of teething problems which PHP has been notorious for in the past. Here are current gripes that are often cited (in no particular order):
1. Namespace mess. This is all all the evidence one needs to officially declare the developers as certified amateurs. Also every programmer has their own opinions about whether function names should be camel case, abbreviated, underlined, etc, but at least we agree to pick one convention and stick to it. PHP is the only language I know of where standard functions have completely disregarded any kind of standard naming convention. One has to wonder whether they had any future direction at all.
2. Thread safety risks inhibit web hosts from being able to deploy multi-threaded versions of apache.
http://neosmart.net/blog/2008/dont-believe-the-lies-php-isnt-thread…
(I’d appreciate any information about whether they’ve finally fixed it, but it was still crashing in 2010/11)
3. Unicode.
I’m often called up by clients who find unicode glitches on a website caused by php bugs in handing unicode characters which may have been posted into the database, etc. I replace unicode characters with html equivalents, but unicode should just work these days.
4. Magic quotes.
Stupid, stupid, stupid, stupid…
5. Lack of session concurrency.
I uncovered this this year when I was trying to use concurrent ajax calls to monitor a long running process. One visitor can only have one running script per session. Apache will pass a predefined number of concurrent connections to PHP, but PHP will block them and run them serially. So, the long running process would block all further PHP pages for this visitor until the long running process was complete. This entirely defeated my intended purpose of employing concurrent ajax calls. I ended up writing a C daemon to work around the limitation.
6. Comparison operators
PHP diverges from other dynamically typed languages to use this proprietary syntax.
if (F(x)) {…}
vs
if (F(x)==true) {…}
vs
if (F(x)===true) {…}
PHP’s equality personality disorder is a source of bugs and confusion. To make matters worse, we’ve got expressions like “x>==0”.
7. PHP’s documentation
Well, PHP documentation is a big plus. I thought it was superb, or so I did before php.net recently injected google search results ahead of it’s own function search listings. Why did they do that?? Now I have to scroll through a screen full of irrelevant google listings before I can click on the php.net links I want.
You have enlightend me and brought up a lot of things that I didnt think about, but I know them (just forgot), for example that “===” is certainly a very stupid nonstandard way.
So whats the language I should use then?
dikatlon,
“So whats the language I should use then?”
If you don’t have your own server at your disposal, then there’s no denying that the widespread availability of a language is a compelling reason to use it. For better or worse, network effects have driven me to hypocritically use PHP simply because it’s popular with clients.
My own personal projects are more geared towards system programming. But if I were to choose a new web language to learn today it’d be Opa. It seems to be a very welcome radical shift away from the multi-tier approach of SQL/PHP/HTML/CSS/JAVSCRIPT/DOM into a new more convergent paradigm. Not that I can recommend something I have zero experience with it, but I’m never the less extremely interested in what it potentially offers.
My interest in Opa was sparked here on OSAlert, actually:
http://www.osnews.com/story/25564/Programming_Opa_Web_Development_R…
REBOL.
PL/1
The popular alternatives on *nix is Ruby or Python with a framework like Django or Ruby on Rails.
If you are a dedicated Microsoft $hill like me, well there is ASP.NET MVC which is equivalent.
5. is depends.
4. is gone in 5.4.
2. that isn’t true.
Pretty much every extension that is support on Windows has threading support.
The problem is with all the other extensions which are not supported on Windows.
The cause is 2 fold:
1. the library the extension is using does not support threading
2. on Unix/Linux a large share of Apache users still uses pre-fork of FastCGI. Thus threaded PHP does not gets a lot of testing.
Edited 2012-10-01 12:25 UTC
Lennie,
(Adding back my numbers for context)
2. Thread safety
“2. that isn’t true. Pretty much every extension that is support on Windows has threading support.”
It is true, at least on linux/apache, I’ve tested it myself, it was racy (I’m not referring to extensions either). If they’ve fixed it I’d really like to know from someone who’s *thoroughly* tested a more recent version.
“2. on Unix/Linux a large share of Apache users still uses pre-fork of FastCGI. Thus threaded PHP does not gets a lot of testing. ”
That’s rather circular isn’t it? I say we’re stuck using pre-fork because of threaded PHP bugs, you say threaded PHP is buggy because we’re still using pre-fork.
4. Magic quotes.
“4. is gone in 5.4.”
Yea, it represents yet another compatibility breaking change. In a production environment a hosting provider cannot simply update to 5.4 and break all the installations of OS commerce etc, so many providers are still holding back, which is arguably the right thing to do instead of breaking client websites. My provider actually *still* assigns .php to PHP4 for this reason. For PHP5, we can use .php5 files. I suppose they could install PHP5.4 and make us use .php54 files or some .htaccess kludge, but we’re only in this stupid situation because of the shortsightedness of PHP developers in the first place.
I am thankful that future code will be free of the magic quotes crap, but we’re still in the fallout.
5. Lack of session concurrency.
“5. is depends.”
…on what? Take a stock PHP installation, use the stock session handler, and it blocks like a mutex.
I’d hope PHP eventually solves all the technical shortcomings. In the end, it’s a “good enough” language, but the mess with namespaces/function names is probably never going away.
Edited 2012-10-01 18:39 UTC
Someone should build a “scripting language generator” web site; where you can click on some checkboxes to select the features you want, click on some more checkboxes to select syntax style, then enter the new names for keywords (for do, while, for, etc). Once done, you’d click the big submit button at the bottom and it’d generate the interpreter and documentation. That way people who create a new language for no reason (except for giving other programmers the extra hassle of learning yet another pointlessly different syntax) can quickly get to the “reinventing libraries” stage.
With any luck, millions of people would use the scripting language generator to create millions of new languages; and then programmers will never be able to understand source code written by anyone else ever again, and will waste their entire lives just learning new languages without ever finding time to write any code.
– Brendan
There is a whole lot of framework you can use to create your-own-language2javascript generators:
http://altjs.org/
That seems to be “everyone” favorite past time ?
I was going to create my own language once. I had a list of LISP features I was going to reinvent badly. I was good to go, but then they beat me to it.
We already have a prototype based programming language that nobody likes using.
Looks alright, but I honestly don’t see the point.
/me “Oooh! codeproject have a new site design!”
Rest: tl;dr. Not interested in YASL. Especially one that brings nothing exciting of compelling to the table.
PHP is a great langauge.
The guy is just moaning because he thinks he is better that everyone else.. sure some things are strange with php but “blind leading the blind”… seems to me that facebook and wikipedia use php… loads of companies do… how many multi million dollar companies has mr blogger created with perfectly logical langauges? What websites has he created that attract billions of people?
There are all kinds of people like him in every job/discipline/industry. The vast majority of people cook like amatuers… the blogger probably does himself. Should we all think that what everyone is eating is shit becuase it’s not what gordon ramsey think is the way to cook.
Does this blogger use his own car? Did he build it himself? Why not? Cars are just made for idiots to drive who don’t know how to make a car themselves.
And learn to write a blog first that attracts more then a few hundred nerds and then your be a professional blogger who people listen to… til then your just an amateur
Edited 2012-10-01 12:19 UTC
Only if by great you mean “it sorta works and you don’t really need to know anything to use it”.
Granted the guy goes overboard a bit with the whining but PHP is truly horribly designed or more accurately, not designed at all.
Because quantity equals quality. Or not. It depends on what you want to “prove”.
I would certainly hope professional chefs don’t cook like amateurs.
Great job of making an argument that has nothing to do with the quality of PHP. At all.
Sorry to rain on your parade but the number of readers your blog have has no relation to how good your posts are.
Setting aside the number of views and questions on the purpose, value and implementation of the ObjectScript language, I am curious about the name. Will the project developers run into legal issues regarding the naming of the language, as InterSystem^aEURTMs Cach~A(c), a commercial and multi-platform implementation of the M/MUMPS programming and data store platform with its own object extensions has its own language named ObjectScript? Cach~A(c) is still in wide use in a number of vertical application markets, such as Secure Financial Management and Transactions, Hospital Information Systems (HIS) and Medical Records Management.
http://vista.intersystems.com/csp/docbook/DocBook.UI.Page.cls?KEY=G…
Did I read the file right? One cpp file has 18k lines of code…
What? You mean it’s over 9000!!!!?!!!?!?
To me, the biggest benefit of PHP is that there’s soo much code written in it.
If I need a specific framework, library, function or API implementation it’s most of the time already written by someone else. This speeds up development a lot compared to Python or Ruby.
As for the language itself, it could be a lot better. And debugging could be a lot easier.
But it could also be a lot worse. I couldn’t imagine writing a webapp in something like AppleScript for example. It would drive me insane.
rain,
“To me, the biggest benefit of PHP is that there’s soo much code written in it.”
Of course there is truth in that, it’s beneficial to learn and use what’s already popular. At the same time, these very same network effects are responsible for the US being stuck on english units. Network effects are the bane of meritocracy.
Hi, I’m author of ObjectScript and I’m new here.
At the moment I’d like to introduce you the first step of new cross platform engine made with ObjectScript and Marmalade SDK.
You can view video of examples here:
http://youtube.com/watch?v=uep2SvXdCNU
http://youtube.com/watch?v=3RHek-UhkCk
http://youtube.com/watch?v=OCWIfQYW9rc
http://youtube.com/watch?v=P5KPJOVSs3E
http://youtube.com/watch?v=htDqDNqHX-I
http://youtube.com/watch?v=wqiDeuf7yu8