Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
What do you mean? Where did you propose to ditch the comma?

I really dislike the
Code:
[object methodNameAndArgument1Name:argument1 argumentName2:argument2]
syntax... I'd much rather something that looked more like
Code:
object.methodName([b]argument1Name:argument1 argumentName2:argument2[/b])

That would be a lot less jarring for people coming from C++, Java, Python, and related languages. The biggest difference to other languages is there's no commas between arguments, and argument names and their values are separated with a colon (as in Obj-C currently) rather than an equals (as in Python when using key word arguments... Java and C++ both lack this concept currently).

Emphasis added.

I had a class where we worked in Racket and other Lisp dialects. Something I noticed was that we never typed commas, and I never missed them. In Lisp dialects, all you use to separate things are brackets or one type or another, or whitespace.

HOLY CRAP. I like this example from page 190:

Code:
let anotherPoint = (2, 0)
switch anotherPoint {
case (let x, 0):
    println("on the x-axis with an x value of \(x)")
case (0, let y):
    println("on the y-axis with a y value of \(y)")
case let (x, y):
    println("somewhere else at (\(x), \(y))")
}

So many nice things all crammed into such a small example, but mostly I like the fact that I can bind to parts of a pattern in a switch. Reminds me of Racket.


WAIT! There's more in that example that I didn't even notice at first! The compiler is smart enough to know that a default isn't necessary, because let (x, y) will match anything passed in!


!!!!!!!!!!!!! There's more! This actually looks like something I don't think I've ever seen any other language capable of handling:

Code:
let yetAnotherPoint = (1, -1)
switch yetAnotherPoint {
case let (x, y) where x == y:
    println("(\(x), \(y)) is on the line x == y")
case let (x, y) where x == -y:
    println("(\(x), \(y)) is on the line x == -y")
case let (x, y):
    println("(\(x), \(y)) is just some arbitrary point")
}
 
Last edited:
I doubt it. Apple is pretty open with their development of things like Clang, so I don't think they'd surprise us with an all new language at WWDC.

But if they want to...

I'd love it if the whole language became more unified feeling. Right now all the freaking @ signs just to signal that the following code is Obj-C code is obnoxious.

String building is annoying. Why can't we just add strings like in Java or Python, or like << in C++?

Needs namespaces (name collisions, while rare, are super obnoxious and difficult to discover and debug).

Needs a package manager (I'd love it if they added a marketplace full of carefully curated Obj-C frameworks and libraries that we could buy and sell and review and pop right into our projects - but that's a change to Xcode / the whole developer program, not to the language).

Generators, iterators, dictionary and array comprehension... that'd all be sweet.

I really dislike the
[object methodNameAndArgument1Name:argument1 argumentName2:argument2]
syntax... I'd much rather something that looked more like object.methodName(argument1Name:argument1 argumentName2:argument2)

That would be a lot less jarring for people coming from C++, Java, Python, and related languages. The biggest difference to other languages is there's no commas between arguments, and argument names and their values are separated with a colon (as in Obj-C currently) rather than an equals (as in Python when using key word arguments... Java and C++ both lack this concept currently). Plus it would change []s as exclusively meaning that something is being indexed into and make dot syntax look less... weirdly out of place.

Further, I'd love the ability to have argument names be optional and to make arguments themselves be optional. This would require making it possible to set default arguments.

I'd love to introduce contracts that can be checked at compile time into the language. IE, better type checking and checking for null. It would cut down on run time error handling... or worse, not detecting/handling errors at all. You could also have contracts that guarantee a certain complexity class for a function, for example. See the "Typed Racket" language for more contract ideas (I love union types and the various niceties produced by that...)

Do away with having the programmer type out imports and includes lines. Those are dumb. The compiler should be able to run through the code, determine that it doesn't know what something is within its current scope and attempt to expand that scope on its own through trying different imports and includes and whatnot until it is able to resolve it - namespaces should help the compiler with this. If no matter what it does, it can't resolve the variable, only at that point should it fail compilation and think that the user has a typo.

And... I think that's all of the ideas I have right now. I've basically just described all of the major things I'd like for my own programming language that I'd like to implement someyear when I have the resources (i.e., time, money) for such pursuits.

Well. I guess you were surprise. But obviously you put some thought into this. So I guess in some ways you weren't really all that surprised.

So what do you think? Is this the next major programming language?
 
I have to say my main reaction so far is that the new language seems to be more "Procedural" with objects. More like an upgrade to C that made Objective-C redundant rather than an upgrade to Objective-C.

Sure seems to tick a lot of good boxes like @Lazy properties but not sure why they stayed with all the ( )brackets. (No shift key needed for square [] brackets)

I think it's very much geared at getting more programmers in the Apple ecosystem. More than say getting people who have problems to solve in to programming.
 
Last edited:
Programming is not a weekend, "i wanna get rich" thing.

Tell that to Flappy Bird! $50,000/daily in advertising sure seems like a "get rich in a day" thing.

Hell, even tell that to Angry Birds, Cut the Rope, Candy Crush, etc. Those became rich virtually overnight.
 
Tell that to Flappy Bird! $50,000/daily in advertising sure seems like a "get rich in a day" thing.

Hell, even tell that to Angry Birds, Cut the Rope, Candy Crush, etc. Those became rich virtually overnight.

That has nothing to do with "programming". It is more to have the right idea at the right moment in the right place for the right audience.

I bet many people can write a program of similar complexity in the same time, it doesn't mean they will become rich suddenly.
 
Tell that to Flappy Bird! $50,000/daily in advertising sure seems like a "get rich in a day" thing.

Hell, even tell that to Angry Birds, Cut the Rope, Candy Crush, etc. Those became rich virtually overnight.

I understand (or have read) that Flappy Birds was just a $10 app that was purchased online and re-skinned. I think they said it was a Game Salad template.

That's not programming. The others I would guess are actually programming. It's not too hard to buy a template, change the graphics and focus on marketing, but that's not what I would consider programming.
 
!!!!!!!!!!!!! There's more! This actually looks like something I don't think I've ever seen any other language capable of handling:

Code:
let yetAnotherPoint = (1, -1)
switch yetAnotherPoint {
case let (x, y) where x == y:
    println("(\(x), \(y)) is on the line x == y")
case let (x, y) where x == -y:
    println("(\(x), \(y)) is on the line x == -y")
case let (x, y):
    println("(\(x), \(y)) is just some arbitrary point")
}

F# can do this. They are called "match expressions":
http://msdn.microsoft.com/en-gb/library/dd233242.aspx
 
None of those examples actually demonstrate what I got excited about, namely the "x == y" portion. Not saying that F# can't do it, but their examples don't demonstrate if it can see relations between the variables being matched.

Lots of (primarily functionally inspired) languages have that feature. Here is the equivalent in Scala:

Code:
val yetAnotherPoint = (1, -1)
yetAnotherPoint match {
  case (x, y) if x == y => println(s"($x, $y) is on the line x == y")
  case (x, y) if x == -y => println(s"($x, $y) is on the line x == -y")
  case (x, y) => println(s"($x, $y) is just some arbitrary point")
}
 
None of those examples actually demonstrate what I got excited about, namely the "x == y" portion. Not saying that F# can't do it, but their examples don't demonstrate if it can see relations between the variables being matched.

They have an example on their pattern matching page (under Variable Patterns):
Code:
let function1 x =
    match x with
    | (var1, var2) when var1 > var2 -> printfn "%d is greater than %d" var1 var2 
    | (var1, var2) when var1 < var2 -> printfn "%d is less than %d" var1 var2
    | (var1, var2) -> printfn "%d equals %d" var1 var2

http://msdn.microsoft.com/en-us/library/dd547125.aspx
 
I doubt it. Apple is pretty open with their development of things like Clang, so I don't think they'd surprise us with an all new language at WWDC.

But if they want to...

I'd love it if the whole language became more unified feeling. Right now all the freaking @ signs just to signal that the following code is Obj-C code is obnoxious.

String building is annoying. Why can't we just add strings like in Java or Python, or like << in C++?

Needs namespaces (name collisions, while rare, are super obnoxious and difficult to discover and debug).

Needs a package manager (I'd love it if they added a marketplace full of carefully curated Obj-C frameworks and libraries that we could buy and sell and review and pop right into our projects - but that's a change to Xcode / the whole developer program, not to the language).

Generators, iterators, dictionary and array comprehension... that'd all be sweet.

I really dislike the
[object methodNameAndArgument1Name:argument1 argumentName2:argument2]
syntax... I'd much rather something that looked more like object.methodName(argument1Name:argument1 argumentName2:argument2)

That would be a lot less jarring for people coming from C++, Java, Python, and related languages. The biggest difference to other languages is there's no commas between arguments, and argument names and their values are separated with a colon (as in Obj-C currently) rather than an equals (as in Python when using key word arguments... Java and C++ both lack this concept currently). Plus it would change []s as exclusively meaning that something is being indexed into and make dot syntax look less... weirdly out of place.

Further, I'd love the ability to have argument names be optional and to make arguments themselves be optional. This would require making it possible to set default arguments.

I'd love to introduce contracts that can be checked at compile time into the language. IE, better type checking and checking for null. It would cut down on run time error handling... or worse, not detecting/handling errors at all. You could also have contracts that guarantee a certain complexity class for a function, for example. See the "Typed Racket" language for more contract ideas (I love union types and the various niceties produced by that...)

Do away with having the programmer type out imports and includes lines. Those are dumb. The compiler should be able to run through the code, determine that it doesn't know what something is within its current scope and attempt to expand that scope on its own through trying different imports and includes and whatnot until it is able to resolve it - namespaces should help the compiler with this. If no matter what it does, it can't resolve the variable, only at that point should it fail compilation and think that the user has a typo.

And... I think that's all of the ideas I have right now. I've basically just described all of the major things I'd like for my own programming language that I'd like to implement someyear when I have the resources (i.e., time, money) for such pursuits.

You really nailed it here. I'm a newer developer coming over from some other more wordy languages and my goodness....Objective C is the ugliest thing ever. The syntax for object manipulation as you pointed out is just obnoxious! C'mon guys.... Where's the standard: Objectname.member syntax? Just awful.

Lots of the other stuff you mention makes sense too. Strings are handled terribly. The braces get ugly after a while too.

It is what it is. Damn though, feel like I just started writing code a month ago! :confused: ;)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.