Yup, literal syntax for vectors are very convenient and heavily used
in Clojure code.
And (let) bindings are evaluated left to right. It's analogous to
Scheme's let* i think?
Only thing to watch out for is that (binding) bindings are not
evaluated left to right. It's for performance reasons I thi
The (list) comes from my dabblings with other lisps, using a vector
does make more sense and I quite like it
I was unaware that, unless I am mistaken from your above code that let
bindings are evaluated left to right, that is I was under the
impression (incorrectly) that you could not use say vm i
Most of that java code is just pasting together library function
calls. I'm not sure if there's any more elegant ways of doing that.
Your clojure code looks fine for the most part I think. It's mostly
just a question of style. The only thing that sticks out is the call
to (list). That's generally n
Sorry, you are not commenting out a line of code but ignoring the next
form.
On Feb 11, 12:49 pm, Brenton wrote:
> You can also you #_ to comment out a line of code
>
> #_(.vm detach)
>
> so that you don't have to put )) on the next line.
>
> Brenton
>
> On Feb 11, 10:39 am, Greg Bowyer wrote:
>
You can also you #_ to comment out a line of code
#_(.vm detach)
so that you don't have to put )) on the next line.
Brenton
On Feb 11, 10:39 am, Greg Bowyer wrote:
> Hi all, long time lurker first time irritant.
>
> I have been playing with clojure for a little while, and finding it most
> exc
You can use get on Properties. Use .foo for method calls. Use literal
vec syntax, not list. Use or for conditional branches instead of (if
foo foo ...).
Untested:
(defn obtain-local-connection [vmid]
(let [vm (VirtualMachine/attach vmid)
props (.getSystemProperties vm)
acqu
Hi all, long time lurker first time irritant.
I have been playing with clojure for a little while, and finding it most
excellent; however my lack of lisp thinking keeps leading me to write
ugly code.
I have the following code in java:
--
static final String CONNECTOR_ADDRESS =
"com.sun.