Comments (7)
Very good idea. this would be very useful.
However I suggest that language enhancements, espeically ones that dont conform
to
java specs, be either defered or in a new fork/branch.
Original comment by [email protected]
on 9 May 2007 at 12:42
from beanshell2.
I can see how this syntax would be useful and convenient. However, Beanshell
is a
java-like language, and I don't think that it is such a good idea to be adding
non-java syntax.
Original comment by [email protected]
on 29 Mar 2008 at 1:29
from beanshell2.
I agree that adding a lot of non-java syntax is a bad idea. But the 2 global
methods
I suggested here, list() and map(), are possible without any syntax additions
as long
as we have varargs, which is part of java since jdk 1.5 . The only addition to
syntax which is suggested is a "=>" binary operator to create Map.Entry
objects. And
this is very minor addition, just one more binary operator.
Original comment by [email protected]
on 29 Mar 2008 at 5:36
from beanshell2.
Perhaps another command ("pair(key, value)") would be sufficient?
Than you could do
numberNames = map(pair(1, "one"), pair(2, "two"), pair(3, "threee"));
No new symbols ;)
Original comment by [email protected]
on 21 Feb 2011 at 11:25
from beanshell2.
That works but maybe entry is better than pair() as in:
numberNames = map(entry(1, "one"), entry(2, "two"), entry(3, "three"));
Original comment by [email protected]
on 21 Feb 2011 at 3:47
from beanshell2.
> numberNames = map(entry(1, "one"), entry(2, "two"), entry(3, "three"));
vote +1
Original comment by [email protected]
on 2 Mar 2011 at 8:11
from beanshell2.
> numberNames = map(entry(1, "one"), entry(2, "two"), entry(3, "three"));
vote +1
numbers = list( 1, 2, 3 );
vote +1
Original comment by [email protected]
on 29 May 2011 at 9:42
from beanshell2.
Related Issues (20)
- A way to stop an Interpreter or at least see if it is running
- can't access public fields HOT 7
- improvement suggestion: make a built-in read-eval-print loop HOT 1
- Bean sheel extensions: printing live objects HOT 1
- java.lang.VerifyError: (class: BshTestExtended, method: _bshSuperexecute signature: (J)J) Register 1 contains wrong type
- Deploy to maven central HOT 2
- Reflect.getIndex() throws ArrayIndexOutOfBoundsException HOT 2
- JConsole improvement ideas + patch
- Is this project dead? HOT 4
- CVE-2016-2510 HOT 1
- Licence change: LGPL to Apache-2 HOT 8
- How Map{} is mapped into methods? HOT 4
- Parser Error in Comment Token
- Finally block is not executed if an exception is thrown in the previous catch block HOT 5
- Support for "final" inside method parameters HOT 2
- Parser Error for binary number HOT 1
- Unable to call inherited methods HOT 1
- version 2.1.7: can not access a member of class with modifiers "public final" HOT 3
- Method size() not found on unmodifiable list HOT 2
- Cannot access methods of inner classes in Beanshell 2.1.7 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 beanshell2.