hacker news.share:

My language link was posted on ycombinator news yesterday (?), resulting in a spike in the views on this site. I read through the comments and a couple things stood out.

First, the idea of Copper being “loose” was met with confusion. I’ve considered Copper loose more as a “feel” compared to C++, Rust, and other languages that have lots of syntax. “Simple syntax” would have been more descriptive. The fact that there aren’t many rules makes coding in Copper feel like playing. “Rigid” languages make their code look the same. e.g. If you write a routine in Java, chances are someone else’s routine to do the same job is going to look similar. In that sense, Ruby would also be considered “loose” because there are at least 3 unique ways of doing anything. In Copper, you have a similar situation: You can practically reproduce most any paradigm offered by other languages (albeit, perhaps, in a clunky way for some of them). One quick example is the “for_each” or “for_members” loop. It doesn’t exist in the interpreter, but you can create it in the following way:

for_members = [parent action] {
  ml = member_list(parent)
  mllen = length(ml:)
  i = 0
  loop {
    if ( equal(i: mllen:) ) { stop }
    action(member(parent item_at(ml: i:)))
    ++(i:)
  }
}

Similarly, you can replicate other loop structures.

The second thing about Copper people found confusing was the use of colons (:). Colons are nothing more than a shorthand for argument-less function call, usually done with parentheses. Colons make the code more readable because you don’t have to wonder about so many parentheses. The need for so many function calls comes from the fact that variables only store functions and to access their data, you must call them.

The third thing about Copper people found confusing was the license. I’m not a lawyer, so I don’t have any idea on how to write a license. But one point I wanted to make was that, for legal purposes, the code isn’t “yours”. You don’t get to assign new licenses or sub-licenses to it. The license is still compatible with code under GPL, MIT, and BSD, but a project license can’t blanket cover the Copper code and its license. You should include the Copper license along with your project license when you give it to the user. This isn’t entirely unusual in the software world. It does make for long license files.

I actually happen to be very pro-open-source and pro-free-software, so I have no intention of hounding anyone. I want you to use and have fun with my code. However, when playing with people who are stingy about law, might it help to play equally stingy?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s