Syntax for HTML Island in Script

Nop. When I say to people I use CFML I am not referring to just the markup language am I? I am not a CFScript developer?

Using CFML for yet ANOTHER definition. CFScript is a subset of CFML. At least that is how the world sees it.

Well, I am part of “the world” and I don’t see it that way.

This is also how I was thinking about it.

The Adobe definition of cfscript says this: (cfscript tag in ColdFusion)

This to me supports the argument that CFScript is CFScript, not CFML. Yes, they share the Coldfusion language structures - functions, expressions, etc… But they even go so far as say “CFScript equivalents of CFML tags” which seems pretty definitive.

I get that until cfscript existed everything was CFML and most people still reference CFML = Writing in Coldfusion - but really, Coldfusion is the server platform, object model and shared functions/features, CFML and CFScript are two languages to implement Coldfusion solutions. IMHO.

1 Like

I would argue you’re a Coldfusion developer, who knows both CFML and CFScript. If you say you use “CFML”, you’re not saying you use coldfusion, you’re saying you use a language. You use “Coldfusion” as your architecture.

Yep. My damn point exactly. I am a CFML developer that deploys CFML code to ColdFusion and Lucee. I don’t then say, “but I also can do a bit of cfscript”! The clarification isn’t needed since CFSCRIPT is a sub-set of the whole CFML language. A script island if you will.

Whatever, semantics. <cfoutput> would make more sense, but go do whatever, it’s up to you lot. I still havent seen a good use case for this whole feature so discussing implementation is just chatter.

And the lovely arguments we have, there are so many, doesn’t that tell you that people are against it? That “whoa! there might be something wrong with this. I better show why it is a good feature” rather than “I must argue semantics and split hairs and definitions so I CAN WIN THE ARGUMENT!”

I think it’s quite obvious people are against it. I also think it’s quite obvious some people are for it. Does dissent mean we shouldn’t do it? No offense, but if that were the case, no change would ever happen. For anything. Ever.

Those who don’t like it don’t have to use it. Those who want to use it can’t use it at all if it’s not implemented. I don’t have a problem with people who don’t like it deciding not to use it for themselves. I do have a problem with those people deciding no one should be able to.

If one of the core developers of Lucee thinks this is a feature he’ll use every day, and he’s the one supporting the product, why do you have a problem with that? Why does he need to explain himself further? It’s his time and effort to implement and do all future maintenance to it.

1 Like

Because adding features like this make it out in the wild and people use them.

Lucee is not only Igal’s pet project, its something we all will use and our clients and a lot of people. So careful consideration for features should be done. This is why the TAG was formed by the way. And before that another advisory group.

This is ALSO the ideas section so things like this should be expressed and put out for consideration and weigh the arguments of others and not just take them as personal attacks and respond in kind.

I have asked and will ask again, when we add new features like this we have to think:

  1. What is the pain point we are trying to resolve?
  2. Does it improve code quality?
  3. Does it provide developer productivity?
  4. Does it improve the language per se?
  5. Does it make the language more marketable?

So far the pain point is “I want to write crap code and I want a way to do that” as so far that the only thing that has been demonstrated to me. I am not saying that people DO write bad code but in all the examples above I cannot see anything that cannot be done in a better and more modular manner.

1 Like

Here’s a use-case:

I want to be able to use XML inline and not in a string, without losing syntax hilighting and without worrying about escaping apostrophes.

What more do you need?

What is the pain point we are trying to resolve?
Does it improve code quality?
Does it provide developer productivity?
Does it improve the language per se?
Does it make the language more marketable?

That looks like a ripe candidate for XSLT and XMLTransform too

What is the pain point we are trying to resolve?

I wrote very clearly in that same post you quoted from. Do you even read what I write or is it simply easier to complain?

Does it improve code quality?

Absolutely! Unless you want to argue that syntax hilighting does not improve code quality?

Does it provide developer productivity?

Absolutely! Syntax hilighting allows you to spot errors fast

Does it improve the language per se?

Absolutely! By the fact that it improves productivity and code quality.

Does it make the language more marketable?

Absolutely! By the fact that it improves productivity and code quality.

Didn’t you write above that this wasn’t an “attack” on me? I think that you keep contradicting yourself.

So now I write “crap code” and you write superior code? Give me a break!

If it was as you claim, and I had not cared about anyone and added whatever feature I wanted then I wouldn’t have spent hours on this thread here.

I could have implemented this feature 3 times in the time I spent on this thread.

Which is pretty much what we want to happen… If people won’t use them why would we implement them?

DIdn’t say it was Igal’s pet project. However, it IS open source. Which means anyone can write whatever they want, at any time, and contribute it. I dare say even without your permission.

I’m not looking to pick fights, but I think most would agree that in the past 2 years TAG has accomplished very little, mainly because every discussion ends up exactly how this one has, and no one bothers to pick up the pieces and reach a decision like I’m trying to do. There’s a reason Lucee now has a development project manager.

Not unreasonable questions - however, 2, 3, 4, and 5 are all subjective points which will never reach consensus. What is quality, productive, improvement, marketable etc is in the eye of the beholder.

1 has been demonstrated by a few snippets in this thread. I can imagine others.

Also subjective. No consensus. You live in MVC and Script. Great. DON’T USE IT.

I have over 2 MILLION lines of tagged CFML. Some is MVC. Some isn’t. All my developers have differing skillsets. I can’t wave a wand, and overnight have them think a completely different way, and do MVC in a vacuum, and rewrite everything in script. It won’t happen. It can’t happen. It’s not cost effective for a business to pay for it to happen or expect it to happen.

And it doesn’t HAVE to happen, because those 2 million lines of code WORK, and do what they were DESIGNED to do, and are READABLE for the people who have to maintain it, and the developers are PRODUCTIVE.

So whether you THINK it’s crap code or not is completely immaterial to the discussion.
The fact you’re comfortable with XML and XSLT is great, you can solve your XML problems however you want.
The assertion you’d never mix markup and script in a template is great, you can solve your problems however you want, write your code however you want and make it as “readable” as you want.

Not implementing a feature because YOU don’t see the merit, again, I postulate no one here needs your permission. Your advice has been registered and heard.

My take on this is we have 130 some posts here and this is what I’ve got:
In support of the feature:
Igal
justincarter
alexskinner
modius
joe.gooch

Those who provided constructive opinions but didn’t put their support one way or another
Gert
Micha
Brad
Sam_Jay
Julian_Halliwell
howardowens
mattlevine
tpkelley

Undetermined:
pfreitag
ryanguill

Against:
JimP
JackOfWebtrades
ddspringle
markdrew

I don’t think it’s fair to say that 4 dissenting opinions outweigh everyone elses.

Ok, I never said you needed my permission to do anything?? I asked you to win me over without personal attacks (I have attacked code, not the person) I have said crap code, not crappy developer. And now we are talking META about the argument.

Even in your stats, you have 5/4 plus a bunch of people that have abstained, even from THOSE stats alarm bells should ring in your head shouldn’t they? Other features get a resounding YEAH! This one has proved controversial. Didn’t know we had to vote on features (aside from voting on jira tickets to show general interest)

The list I made is what you would do with any new feature for any product that a product manager would be thinking of implementing. I realise this is an Open Source project and anyone can contribute, but those merge requests should meet some quality/functionality level right? Both in the code they contain (format, code standards) and features.

I also believe that @alexskinner withdrew his vote if I am being pedantic.

(oh god, we are back to meta arguments)

FWIW I am not a huge fan of the idea. One the one hand this would make my cfscript.me development work much easier. On the other hand I am trying to maintain a CFML parser, so I have biases.

I think what Mark was trying to point out is that there is not overwhelming support for this feature that is a pretty significant language change. There is a ticket: [LDEV-1324] - Lucee it has one vote.

So it seams a little pointless to be arguing about syntax, unless it has been decided that it will be implemented - has that been decided?

Anyways my vote is for this syntax:

if (false) {
  <cfswitch into="tags">
      <cfoutput>;-) Just Kidding</cfoutput>
  </cfswitch>
}
3 Likes

I guess it doesn’t feel at all like a significant language change to me.

You can switch from tags to script with cfscript… and go back and forth all you want.

It seems logical to be able to go the other direction as well. It doesn’t sound like a big deal.

We’re not building a new language, or rewriting core functionality, or really anything that has any sort of significant downside. If you don’t need it, and don’t want to use it, there’s 0 downside. There’s no risk.

Most of the people who think it’d be bad and there’ll be more bad code are in the business of advising people on how to code better, or setting standards for their own projects/projects they oversee - so if anything, if we do have more “bad code” written (by whatever metric you use), it increases the amount of business advising those developers on how to write better code… so if anything there’s a built-in business benefit.

Those who say there are better solutions in cfscript than switching to CFML should also realize that if a developer has to write extensive markup in a template, they’re probably just going to use tags, and not use script at all, if this feature weren’t implemented. If anything, this makes it easier to learn and incorporate cfscript in ways that weren’t possible or were clumsy or less readable before… which increases cfscript adoption, which just about everyone on this thread says is a good thing.

And yes, in a pure MVC environment, your views should be “pure”. I don’t think anyone’s arguing against that. But not everyone writes pure MVC, for whatever reason.

1 Like

I didn’t take it as a personal attack, my point was that when you say “crap code” that everyone has a different definition of what that means. So inherently, you were saying every example you’ve seen so far was crap. (not that the devs were) . I don’t agree, and I explained why. There’s no ego there.

And I know you didn’t say anyone needed your permission, it was just what I inferred from the tone of posts you made (via an imperfect communication medium). If I mis-interpreted, I apologize. I further apologize if any of my statements to anyone have been seen as an attack or offensive. I’m seriously just trying to talk about the issues.

Ultimately it’s not my decision to make. But then again, I don’t know whose decision it is. (Has Lucee/LAS ever defined that process? Does Patrick pick? I don’t know.)

All this discussion was supposed to be about was the syntax of implementing the feature. It wasn’t stated it would be implemented. If anything, Igal just asked for help clarifying the description in the ticket.

I’m also just saying dissent neither means it should nor shouldn’t be done. And yeah, if there are features on the list that have resounding support, I fully expect they’ll be prioritized higher. Again, not my job.

Then again, it’s not really my job to get some sort of consensus on this ticket either. But it’s exactly these sorts of things that keep our community from growing - when every discussion devolves into this sort of petty bickering, who wants to be a part of that? It’s just frustrating for everyone.

After the dissent has been registered, is it possible to get to a “Yes, And” situation? Or not? Is it possible to look at things from someone else’s point of view?

I argue this feature isn’t the problem with the Coldfusion language, adoption, or the community, it’s the inability to discuss anything civilly.

Every example I have seen doesn’t merit the implementation of this feature.

I have stood in front of people at keynotes describing features of Railo many times. So when I see this, I think to myself. “Ok, you have to describe this to people and show them examples, of why and where you would use this” and then take answers from good and bad developers alike to either explain or justify.

That is all I asked and keep asking and if it was a good feature to describe there wouldn’t be a heated debate.

If syntax highlighting is the issue, this is an editor issue. That is solved in other languages by having a file (such as .xml, .xslt, .md, .tmpl, .html) that is used to as a template to render stuff out. It is not something for the engine to care about.

When I say bad code is because at the end of the day, code is not for the writer of the code but for the other people that will read it.

And attacks to thought out constructive criticism. Does this mean that I should just shut up ? Like @ddspringle ? who I am sure is thinking twice about contributing to the community.

If I am politely asking for good examples and a reason for it I don’t need sarcasm and to defend why I question stuff, I am PART of the community and investing into Lucee too.

If you see something is wrong, shutting up about it is the worse thing. I was an open to this feature. I could be won over, but the edge cases are not winning me over.

I’ve never met Denard in person, but from what I’ve seen when he has something to say – he says it – and I respect that.

Perhaps he simply got tired of this fruitless “discussion”, as TBH, have I.

And talk about “thinking twice about contributing to the community”… I’m thinking 7 times, at least.

1 Like
2 Likes

That kind of syntax does have precedence in E4X, JSX, so it doesn’t seem too unusual to me… I just want to make sure we’re not only considering the use case of immediate output, because I think capturing the result of from an expression is just as important (and wrapping in additional cfsavecontent is nasty).

Slack doesn’t seem to deal with it well, and I think GitHub’s flavour of Markdown might also be an issue because it only uses backticks for code blocks rather than indentation, which means triple backticks inside the code block itself won’t render nicely;