Comments (11)
It would be nice if the button for editing on github is also added to this page. Else add an entry in README
from groovy-website.
"you may be surprise to see " => Should be surprised
from groovy-website.
"first the constructor is called, then the setters are called in turn" -> "the setters are called in the sequence in which they are specified in the map"
The sequence might matter in some cases. I am commenting as I keep on reading else I'll forget.
from groovy-website.
"Last but not least, prefer using single quoted strings when you need string constants". It would be good to add why this should be done. I think it is performance. Is there anything else?
from groovy-website.
assert 'foo' =~ pattern
It should be
assert 'foo' ==~ pattern
Running the first I got java.util.regex.Matcher[pattern=fo* region=0,3 lastmatch=]
. Running the second I got true
from groovy-website.
case { it > 3 }
should be case { it > 3 }:
. Missing colon.
from groovy-website.
"If you don’t really care of the exception" => "care about the type of exception"
from groovy-website.
bump
from groovy-website.
The docs are in https://github.com/apache/incubator-groovy/blob/master/src/spec/doc/style-guide.adoc
Regarding assert 'foo' =~ pattern
, it is not really an error, because of Groovy truth.
from groovy-website.
@melix But wouldn't that be always true and hence beat the point of the assert?
from groovy-website.
@anshbansal No, the groovy truth requires the matcher to have at least one match to be considered true:
assert ('a' =~ /a/)
If the matcher does not have a match it is considered false:
assert !('a' =~ /b/)
http://docs.groovy-lang.org/latest/html/documentation/#_matchers
from groovy-website.
Related Issues (20)
- http://groovy-lang.org/syntax.html 6. Booleans link to special rules is wrong HOT 1
- Apache's Image in the Footer HOT 4
- Documentation improvements -- how to run groovy HOT 1
- http://groovy-lang.org/closures.html Incorrect definition of "isOdd" closure HOT 1
- Private key passing issue with Groovy HOT 1
- Bintray consistently providing distribution with incorrect checksum HOT 5
- How could contribute localization for groovy website HOT 1
- It looks frozen, can not finish. HOT 3
- My firefox can't see your google search bar HOT 1
- Broken links for Groovy truth HOT 5
- "Install Groovy" page is out of date HOT 1
- Image positions on home page HOT 2
- Provide secure download method HOT 1
- Typo in metaprogramming.html page HOT 2
- Common events calendar HOT 4
- Site Generator Errors HOT 2
- "Fork me on Github" image placement occludes the scrollbar HOT 2
- anchor history is misbehaving HOT 1
- Too many scrolls HOT 2
- http://groovy-lang.org/syntax.html example for 4.7 Dollar slashy string is wrong HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from groovy-website.