discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Scripting!


From: Dr. H. Nikolaus Schaller
Subject: Re: Scripting!
Date: Thu, 1 May 2014 09:22:32 +0200

Hi,

Am 01.05.2014 um 02:21 schrieb Kevin Ingwersen:

> Hey!
> 
> To explain this subject just a little. I come from actual web development - 
> my roots are deeply in PHP. The only reason I ever learned C++, followed by 
> C, was due to the need to write a php extension. But due to my C++ lectures, 
> I came across objective-c, and fell in love with its syntax, basicaly x). But 
> this made me ask the following question:
> 
> Why is this not available in scripting?
> 
> A year later, I had to ask:
> 
> Is it even possible to use a scripting language, based on ObjC syntax, 
> outside of OS X?
> 
> To be honest, why is there none? Objective-C is a great language - not just 
> for GUI coding. I find that its named parameters are a key-concept. It simply 
> makes function calls so much more understandable - even when you return to 
> your project a year later. My favorite example that I show friends is an 
> actual person. See:
> 
> Mother* mom = [[Mother alloc] init];
> [mom pleaseBring:@"beer" to:@"Sofa" withAmount:1];
> 
> I do not need to explain this, do I :)
> 
> But, I have not given up. Years after my discovery, I have had times where I 
> took google searches…and at a random sudden, Objective-J was created! This is 
> one amazing concept, as I see it. But the downside: You can’t embed it.
> 
> So I wanted to ask this Objective-C community here: Is there a viable, 
> cross-platform, scripting language with actual ObjC syntax? If not - why! :)

I am not aware of any Obj-C interpreter.

But there is Fscript: http://www.fscript.org/

which is some scripting language to inspect and manipulate Obj-C objects.

But it uses a different syntax and appears to be the opposite of what you are 
looking for.

> 
> Before I go and poke people to improve their parsers to add this syntax, I 
> wanted to ask around first. I am too young in C++ to write my own scripting 
> language at the moment (I started last year september), so I cant just do it 
> myself x)


But why do you think you need C++ to write a script interpreter? You can do it 
in Obj-C!

There is a (quite incomplete) interpreter for JavaScript within SimpleWebKit. 
So you just have to modify the syntax.

-- hns


reply via email to

[Prev in Thread] Current Thread [Next in Thread]