Invenzzia »

Pages: [1]   Go Down
  Print  
Author Topic: OPTv2: Over sensitive expression parsing  (Read 217 times)
Description: Discussion wheather or not ist a good idea to forbid keywords in variable names.
0 Members and 2 Guests are viewing this topic.
Skrupellos
User

Offline Offline

Posts: 4


View Profile
« on: August 30, 2011, 23:50:07 »

While switching from Opt 2.0 to 2.1 beta, the expression parser has changed. Now it raises an exception if I write name="$basic@lte" text="$item.lte". The problem is the highlighted "lte" which is a keyword (and a mobile telecommunication standard). The same problem applies e.g. for "new", which is a common name for variables, imagine <opt:if test="$new">.

On the one hand, it clarifies the code if keywords are actually keywords.

On the other hand, its an unfamiliar behavior to forbid e.g. "new" in variables names if variables are marked as such (with a leading "$") for a PHP developer :-)

Therefore the question arises: Is it a bug or a feature to forbid such names as variable names?
« Last Edit: September 04, 2011, 17:50:17 by Skrupellos » Logged
eXtreme
Invenzzia
Administrator
User
*****
Offline Offline

Posts: 129

Jacek Jędrzejewski


View Profile WWW
« Reply #1 on: September 04, 2011, 07:00:33 »

Looks like a bug to me.

Please report your bugs to new bugtracker, hosted on Github https://github.com/OPL/Open-Power-Template/issues as we no longer maintain bugs.invenzzia.org
Please also move your FS#180 and FS#178 bug there, ok?
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Subject Started by Replies Views Last post
ralph lauren paris, However kristensaz 0 30 Last post May 03, 2012, 10:00:41
by kristensaz
OPTv2: Widoczny prolog w trybie debug i blad wyswietlania strony bez niego. gorky_park 1 599 Last post October 30, 2009, 11:39:13
by Zyx
OPTv2: OPT 2.1 - ideas and proposals Zyx 0 959 Last post March 14, 2009, 22:57:23
by Zyx
OPTv2: Main tpl parced but opt:include view not parce amichelin 5 1969 Last post May 03, 2009, 16:03:37
by eXtreme
Management management customer marketing university for press litgaidgeslig 0 175 Last post December 09, 2011, 14:02:10
by litgaidgeslig