The Artima Developer Community
Sponsored Link

Agile Buzz Forum
What If?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
What If? Posted: Nov 8, 2005 1:29 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: What If?
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement

I had this zany idea as I was cutting tile this weekend. I was thinking very reductionist. I was thinking about MOP for Smalltalk. We love to brag that our simple language has just three levels of precedence, dictated by the three kinds of messages: unary, binary, and keyword.

The binary type is just syntactic sugar. Very nice sugar indeed. But we could replace all of our + messages with plus: and such, and we'd still have a fully functional system. Terseness would suffer. What if we go the other way though? What if we generalize keyword tokens to be any alphanumeric token which terminates in one of more infix characters? Normal keyword tokens of the form fold:andGroup: would be fine. But so would a method for Point that looked something like: x=y=. I think you'd have to have rule that tokens of exclusive infix characters could only have one argument, otherwise you'd have to use lots of parens to distinguish between a series of simple messages like + and -, instead of one where they were actually a two arg signature.

Thinking about this, and that MOP thing again, caused me then to wonder why in that case one couldn't just turn the assignment operator into a message. It's just infix characters. And then you could create new assignment methods, like say: +=. To do that you'd have to reify the variable storage more than we do today. That part becomes fuzzy to me, but didn't Self do something like that?

Read: What If?

Topic: Show me the money :) Previous Topic   Next Topic Topic: Quality Technology Reporting

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use