question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Standardizing parser/constructor names

See original GitHub issue

The contributing guidelines on safe constructors state:

Prefer fromString to parse.

But in header definitions we consistently use parse. Should we follow the guidelines or should we change them?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
rossabakercommented, Oct 26, 2021

That’s an excellent point. I’m convinced.

0reactions
bplommercommented, Nov 1, 2021

I’ve also noticed an ambiguity with the unsafe prefix - does unsafeParse on an invalid input throw an exception or return an invalid value? HttpCodec uses parseOrThrow - I like the clarity but I also like having the prominent unsafe prefix. How about using unsafeParseOrThrow or unsafeParseUnvalidated to indicate the unhappy-path behaviour?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Person Name Standardization and Sun Master Index
The Master Index Standardization Engine can process person data that is provided in separate fields within a single record, meaning that no parsing...
Read more >
API:FAQ:Capabilities:Name Standardization
Input Parsing​​ Name Object will parse names into all the individual components. Incoming data can be in varied formats and patterns (Mr John ......
Read more >
Name Standardization: Problems and a Solution
It's easy to slice and dice a name by importing NameCleaver and then instantiating a NameCleaver object for a name and calling parse()...
Read more >
“gnparser”: a powerful parser for scientific names based on ...
Parsing categorizes name's elements into those that are stable and those that are prone to change. Names are matched first by combining them ......
Read more >
HumanName Class Documentation — Nameparser 1.1.2 ...
After parsing the name, these instance attributes are available. Alternatively, you can pass any of the instance attributes to the constructor method and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found