Giter Site home page Giter Site logo

Comments (8)

nishihatapalmer avatar nishihatapalmer commented on May 10, 2024

I guess those constructors just throw CompileExceptions. It only affects you if you use those constructors - as it should.

from byteseek.

nishihatapalmer avatar nishihatapalmer commented on May 10, 2024

This is essentially a convenience constructor. Either a string is a byte array, or it's a regex. In either case we already have constructors for the outputs (SequenceMatcher or byte array). And the byte array can also be modelled by e a SequenceMatcher.

What gives the best convenience?

from byteseek.

nishihatapalmer avatar nishihatapalmer commented on May 10, 2024

So - SequenceMatcher constructor is the only general constructor for SequenceSearch algorithms.

from byteseek.

nishihatapalmer avatar nishihatapalmer commented on May 10, 2024

Downside of making String constructors for search algorithms process regexes, is it creates a hard dependency on all search algorithms to the byteseek sequence matcher compiler and regex parser.

from byteseek.

nishihatapalmer avatar nishihatapalmer commented on May 10, 2024

Currently, matchers and searchers don't depend on the parser and compiler in any way.

from byteseek.

nishihatapalmer avatar nishihatapalmer commented on May 10, 2024

The only excuse for such a higher level dependency is convenience - which is what this is.

Is the convenience of instantiating hex string (or more complex syntax) searchers directly worth the dependency it creates?

from byteseek.

nishihatapalmer avatar nishihatapalmer commented on May 10, 2024

I don't think a hard dependency between the Searcher and Compiler package will really hurt anything.

It's a general design principle to try to keep them as cleanly separated as possible, but this is a case where we already had a support question raised by a user. They expected (or wanted) to be able to do this.

from byteseek.

nishihatapalmer avatar nishihatapalmer commented on May 10, 2024

I'm going to explore using SequenceMatcher compilers directly in the SequeneSearcher String constructors.

from byteseek.

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.