<< Back to previous view

[CLJ-872] Add support for property lookup Created: 04/Nov/11  Updated: 01/Mar/13  Resolved: 16/Dec/11

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: None
Fix Version/s: Release 1.4

Type: Enhancement Priority: Major
Reporter: Alan Dipert Assignee: Fogus
Resolution: Completed Votes: 1
Labels: None

Attachments: Text File 872-add-prop-lookup.patch     Text File CLJ-872-prop-lookup-tests.patch    
Patch: Code and Test
Approval: Ok
Waiting On: Stuart Halloway

 Description   

Add support for property lookups to match functionality introduced in ClojureScript with CLJS-89.

This is a breaking change for Clojure with record/type fields that start with "-".



 Comments   
Comment by Alan Dipert [ 04/Nov/11 4:17 PM ]

Attached 872-add-prop-lookup.patch. It's a first cut that Fogus and I worked on. It needs tests.

Comment by Fogus [ 09/Nov/11 12:03 PM ]

Tests for prop lookup.

Comment by Fogus [ 16/Nov/11 9:10 AM ]

Ready for screening.

Comment by Stuart Halloway [ 09/Dec/11 10:29 AM ]

Can you explain the compiler change? It appears to implement the desired functionality, but also to disable a code path that allows keywords for field lookup (the block at line 892 can no longer be reached by a keyword).

Comment by Fogus [ 09/Dec/11 12:28 PM ]

Clojure has for a while secretly allowed kw lookup for field access. However, in the discussions with Rich and Clojure/dev at http://dev.clojure.org/display/design/Unified+ClojureScript+and+Clojure+field+access+syntax it was decided to use -prop across CLJ and CLJS thus obviating the need for kw access.

Generated at Fri Jul 25 04:18:02 CDT 2014 using JIRA 4.4#649-r158309.