The Artima Developer Community
Sponsored Link

Java Buzz Forum
Comment On Alex Winston's Blog

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
Weiqi Gao

Posts: 1808
Nickname: weiqigao
Registered: Jun, 2003

Weiqi Gao is a Java programmer.
Comment On Alex Winston's Blog Posted: Feb 28, 2008 9:47 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Weiqi Gao.
Original Post: Comment On Alex Winston's Blog
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
Latest Java Buzz Posts
Latest Java Buzz Posts by Weiqi Gao
Latest Posts From Weiqi Gao's Weblog

Advertisement

It looks like java.net doesn't like me any more. I'm not allowed to post a comment to Alex Winston's blog:

Alex Winston's Blog

Comment Submission Error

Your comment submission failed for the following reasons:

You are not allowed to post comments.
Posting as: weiqigao
Allowable html: a href,br/,p,b,strong,em,i,ol,ul,li,blockquote,pre

So I'll post what would have been a comment on that blog here. This is in response to a Cay Horstmann comment that reads:

Cay Horstmann: I think int plus2(int) is a non-starter. Don't entangle the declared variable within fragments of the type. That approach has been thoroughly discredited after it made a disastrous appearance in C/C++. Try writing a function that yields an int=>int function using your syntax...

@Cay, it is actually quiet simple to write such a function:

int makeAdder(int n)(int x) = int (int n)(int x) {
  return int(int x) { x + n };
}

Given the above, we can have

int add7(int x) = makeAdder(7);

and

int result = add7(8); // yields 15

Read: Comment On Alex Winston's Blog

Topic: Google if Jack Black ran it Previous Topic   Next Topic Topic: Google Gears API supported by Aptana Jaxer

Sponsored Links



Google
  Web Artima.com   

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