Coder Social home page Coder Social logo

Comments (9)

janbrouwer avatar janbrouwer commented on July 4, 2024 4

I would at any time vote for PascalCase over uppercase when strings are concatenated parts. Any software can go from PascalCase to UPPERCASE but the reverse is not possible without consulting a schema. I believe it's even more important for predefined types then for entities.

from ids.

aothms avatar aothms commented on July 4, 2024

There might be applications that are not schema-aware and only can go by the instance definitions from the .ifc file which is uppercase. I'm not sure how realistic that is, but that is what we discussed at the time.

from ids.

berlotti avatar berlotti commented on July 4, 2024

That was indeed the reason for the decision.

from ids.

SergejMuhic avatar SergejMuhic commented on July 4, 2024

What about ifcxml?

from ids.

pjanck avatar pjanck commented on July 4, 2024

@janbrouwer +1 from me!

from ids.

TLiebich avatar TLiebich commented on July 4, 2024

the IFC specification for identifiers in EXPRESS is indeed not case sensitive, in ifcXML however it is. Also the candidate spec says that IDS should be applicable in principle also to other schemas (maybe gml, gbXML?) - and then all UPPERCASE ?

so yes, +1 from me as well.

from ids.

CBenghi avatar CBenghi commented on July 4, 2024

Because of regexes in the patterns, implementers are going to have quite a bit of work to do, with any of the choices:

  • for UX developers to produce a good readable UI,
  • for implementers to consider all the XML/EXPRESS options.
  • for the users to ensure that the files we exchange are meaningful and valid across various UXs/Checkers.

Just making strings UPPERCASE when saving from the UI is not enough, because we will have to include some logic to tell apart the metacharacters of regexes:

E.g.:

\w Matches any word character including underscore. This expression is equivalent to [A-Za-z0-9_].
\W Matches any non-word character. This expression is equivalent to [^A-Za-z0-9_].

PascalCase carries more information (PC to UC can be done, not vice versa), but that is also more error prone if end users are typing freely (especially in regexes), so UPPERCASE will probably result in fewer invalid IDS files.

@aothms, I think that the argument for applications that are not schema-aware, is weaker than it was in the past, since we have introduced attributeType, inheritance of properties through types, measures conversion and more.

The choice we make, I think, should depend on what makes most resilient ecosystem, from an end user perspective.

Personally, I think that making the tests case-insensitive would deliver the best user experience, but I acknowledge that it would be the most complex implementation, particularly for UIs.

from ids.

aothms avatar aothms commented on July 4, 2024

@aothms, I think that the argument for applications that are not schema-aware, is weaker than it was in the past

I wouldn't disagree with that, I was thinking the same actually.

Personally, I think that making the tests case-insensitive would deliver the best user experience

That is also most inline with the express semantics. Express is case-insensitive.

I think most regex implementations have an option/flag to ignore case [0] [1]. So you wouldn't have to do case normalization on the pattern (potentially triggering changes when doing \W -> \w.)

I think there is a point for case insensitivity on schema names (what about pset and prop names?) but it's also potentially surprising when then model values are handled case sensitively (users might not always be able to tell the difference).

[0] https://docs.python.org/3/library/re.html#re.IGNORECASE

[1] https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regexoptions?view=net-7.0#system-text-regularexpressions-regexoptions-ignorecase

from ids.

CBenghi avatar CBenghi commented on July 4, 2024

The group decided that for simplicity we can keep it UPPERCASE for version 1.0.
This will need to be documented appropriately, and we can investigate if it is possible to add a restriction to the xsd schema.

from ids.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.