tag:blogger.com,1999:blog-8513438391157777465.post5005080008204125709..comments2023-04-07T05:56:45.278-07:00Comments on Re: Factor: Concatenative Thinkingmrjbq7http://www.blogger.com/profile/06842721076008035602noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-8513438391157777465.post-30655420216067924332011-07-14T10:48:34.559-07:002011-07-14T10:48:34.559-07:00@Dave: You are right that it's partly due to t...@Dave: You are right that it's partly due to the static nature of Java.<br /><br />In <a href="http://www.ibm.com/developerworks/library/j-ft2/" rel="nofollow">Part 2</a>, the author shows a version in Clojure which is much closer to Factor (albeit with a lot more parens).mrjbq7https://www.blogger.com/profile/06842721076008035602noreply@blogger.comtag:blogger.com,1999:blog-8513438391157777465.post-87132487902465801422011-07-14T05:37:41.543-07:002011-07-14T05:37:41.543-07:00You only need to know a few things about Java, too...You only need to know a few things about Java, too.<br /><br />The isFactor method doesn't need to exist as the example stands, its functionality is duplicated in the factors closure.<br /><br />Factor assumes semantic knowledge of stack values, whereas it's explicitly stated (in long form) in this example. (I'm talking about variable names, not type information, in this case.)<br /><br />With those changes the Java example stands at a mere 2x Factor's character count, compared to nearly 3x w/ the original.<br /><br />Still ugly, still bloated, but a more realistic comparison.Dave Newtonhttps://www.blogger.com/profile/13420113088393527059noreply@blogger.comtag:blogger.com,1999:blog-8513438391157777465.post-72907494876764436172011-07-14T05:37:35.271-07:002011-07-14T05:37:35.271-07:00You only need to know a few things about Java, too...You only need to know a few things about Java, too.<br /><br />The isFactor method doesn't need to exist as the example stands, its functionality is duplicated in the factors closure.<br /><br />Factor assumes semantic knowledge of stack values, whereas it's explicitly stated (in long form) in this example. (I'm talking about variable names, not type information, in this case.)<br /><br />With those changes the Java example stands at a mere 2x Factor's character count, compared to nearly 3x w/ the original.<br /><br />Still ugly, still bloated, but a more realistic comparison.Dave Newtonhttps://www.blogger.com/profile/13420113088393527059noreply@blogger.comtag:blogger.com,1999:blog-8513438391157777465.post-871713130385525882011-07-14T03:23:43.641-07:002011-07-14T03:23:43.641-07:00A person would only need to know a few things abou...A person would only need to know a few things about the Factor language to understand what you are trying to do here. The Java version requires more experience.<br /><br />I guess this means you took Java to school, gave it a D grade, and called its parents.diego.ahttps://www.blogger.com/profile/12400541545619526022noreply@blogger.comtag:blogger.com,1999:blog-8513438391157777465.post-65409681658053821452011-07-13T04:47:02.917-07:002011-07-13T04:47:02.917-07:00Factor solution sure is concise and elegant, espec...Factor solution sure is concise and elegant, especially in contrast with the bloat and ugliness of Java.<br /><br />As of "functional thinking in Java", that's what Scala is for ;)yachttps://www.blogger.com/profile/16128063637740653461noreply@blogger.com