tag:blogger.com,1999:blog-5089773352404981635.post1836447952145124863..comments2023-10-04T08:15:13.812-07:00Comments on Daily scala: OperatorsAnonymoushttp://www.blogger.com/profile/07600430363435495915noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5089773352404981635.post-711534395101555222010-03-21T12:23:22.850-07:002010-03-21T12:23:22.850-07:00@Daniel. I am not discussing identifiers specific...@Daniel. I am not discussing identifiers specifically operators. They are special because you can do:<br /><br />var c = MyClass(1)<br /><br />c += 3<br /><br />but if there are any alphanumerics you cannot do that:<br /><br />c x= 4<br /><br />will not work for a method called x because it will think the method name is x= not x.Anonymoushttps://www.blogger.com/profile/07600430363435495915noreply@blogger.comtag:blogger.com,1999:blog-5089773352404981635.post-65458549635668077372010-03-19T17:40:41.525-07:002010-03-19T17:40:41.525-07:00(pedantically) presumably no whitespace characters...(pedantically) presumably no whitespace characters are allowed, according to some definition of 'whitespace'.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5089773352404981635.post-59000239091377525852010-03-19T14:28:24.300-07:002010-03-19T14:28:24.300-07:00Actually, the rule is rather simpler than that. In...Actually, the rule is rather simpler than that. In a valid identifier, any non-alphanumeric characters must follow alphanumeric ones, and be separated from them by an underscore.<br /><br />So, "+a" is not valid because "a" is after a non-alphanumeric character. "a+" isn't valid because "a" and "+" are not separated by an underscore "th15_15_an_weird_example_#@%&*" is valid.<br /><br />ALL unicode characters are valid, with the exception of a few reserved ones: ()[]{}\.,;<br /><br />I can't recall right now any other character that is not allowed in an identifier, but there could be one.Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.com